wgpu-native: Allow <webgpu/webgpu.h> include (#2444)

pull/2446/head
Jérôme Leclercq 1 year ago committed by GitHub
parent d15122fd2d
commit 4f38e27c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/w/wgpu-native/xmake.lua

@ -24,6 +24,8 @@ package("wgpu-native")
add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true}) add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
end end
add_includedirs("include", "include/webgpu")
on_load("windows", function (package) on_load("windows", function (package)
if not package:config("shared") then if not package:config("shared") then
package:add("syslinks", "Advapi32", "bcrypt", "d3dcompiler", "NtDll", "User32", "Userenv", "WS2_32") package:add("syslinks", "Advapi32", "bcrypt", "d3dcompiler", "NtDll", "User32", "Userenv", "WS2_32")
@ -38,7 +40,7 @@ package("wgpu-native")
end) end)
on_install("windows|x64", "windows|x86", "linux|x86_64", "macosx|x86_64", "macosx|arm64", function (package) on_install("windows|x64", "windows|x86", "linux|x86_64", "macosx|x86_64", "macosx|arm64", function (package)
os.cp("*.h", package:installdir("include")) os.cp("*.h", package:installdir("include", "webgpu"))
if package:is_plat("windows") then if package:is_plat("windows") then
if package:config("shared") then if package:config("shared") then
os.cp("wgpu_native.dll", package:installdir("bin")) os.cp("wgpu_native.dll", package:installdir("bin"))

Loading…
Cancel
Save