Skip to content

Commit

Permalink
Fix unit tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
chances committed Sep 28, 2023
1 parent faffb51 commit e608892
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
28 changes: 17 additions & 11 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"systemDependencies-linux": "vulkan >= 1.1.0, patchelf",
"systemDependencies-osx": "metal >= 2",
"systemDependencies-windows": "DirectX >= 11",
"preGenerateCommands-posix": [
"systemDependencies-windows": "vulkan >= 1.1.0 or DirectX >= 11",
"preGenerateCommands": [
"make wgpu"
],
"dflags": [
Expand All @@ -34,16 +34,10 @@
],
"configurations": [
{
"name": "library",
"lflags-posix": [
"-L$PACKAGE_DIR/lib"
]
"name": "library"
},
{
"name": "unittest",
"lflags-posix": [
"-Llib"
],
"postBuildCommands-linux": [
"echo Fixing up libwgpu so path...",
"patchelf --set-rpath '$$ORIGIN' bin/wgpu-d-test-unittest"
Expand All @@ -54,13 +48,25 @@
]
}
],
"libs": [
"wgpu_native"
"lflags-posix": ["-L$WGPU_D_PACKAGE_DIR/lib"],
"lflags-windows": ["/LIBPATH:$WGPU_D_PACKAGE_DIR/subprojects/wgpu"],
"libs": ["wgpu_native"],
"libs-windows": [
"d3dcompiler",
"ws2_32",
"advapi32",
"user32",
"userenv",
"bcrypt",
"ntdll"
],
"copyFiles-linux": [
"lib/libwgpu_native.so"
],
"copyFiles-osx": [
"lib/libwgpu_native.dylib"
],
"copyFiles-windows": [
"lib/wgpu_native.dll"
]
}
4 changes: 2 additions & 2 deletions source/wgpu/api.d
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ alias SurfaceDescriptor = WGPUSurfaceDescriptor;
///
alias SurfaceDescriptorFromAndroidNativeWindow = WGPUSurfaceDescriptorFromAndroidNativeWindow;
///
alias SurfaceDescriptorFromCanvasHTMLSelector = WGPUSurfaceDescriptorFromCanvasHTMLSelector;
alias SurfaceDescriptorFromCanvasHtmlSelector = WGPUSurfaceDescriptorFromCanvasHTMLSelector;
///
alias SurfaceDescriptorFromMetalLayer = WGPUSurfaceDescriptorFromMetalLayer;
///
alias SurfaceDescriptorFromWaylandSurface = WGPUSurfaceDescriptorFromWaylandSurface;
///
alias SurfaceDescriptorFromWindowsHWND = WGPUSurfaceDescriptorFromWindowsHWND;
alias SurfaceDescriptorFromWindowsHwnd = WGPUSurfaceDescriptorFromWindowsHWND;
///
alias SurfaceDescriptorFromXcbWindow = WGPUSurfaceDescriptorFromXcbWindow;
///
Expand Down
2 changes: 1 addition & 1 deletion source/wgpu/enums.d
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ enum SType : WGPUSType {
///
surfaceDescriptorFromMetalLayer,
///
surfaceDescriptorFromWindowsHWND,
surfaceDescriptorFromWindowsHwnd,
///
surfaceDescriptorFromXlib,
///
Expand Down

0 comments on commit e608892

Please sign in to comment.