浏览代码

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

Jérôme Leclercq 2 年之前
父节点
当前提交
4f38e27c5f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/w/wgpu-native/xmake.lua

+ 3 - 1
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})
     end
 
+    add_includedirs("include", "include/webgpu")
+
     on_load("windows", function (package)
         if not package:config("shared") then
             package:add("syslinks", "Advapi32", "bcrypt", "d3dcompiler", "NtDll", "User32", "Userenv", "WS2_32")
@@ -38,7 +40,7 @@ package("wgpu-native")
     end)
 
     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:config("shared") then
                 os.cp("wgpu_native.dll", package:installdir("bin"))