소스 검색

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"))