Skip to content

Commit 0cf74f2

Browse files
committed
use env var for emdawnwebgpu on macOS/Linux
1 parent e971b69 commit 0cf74f2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/guide/cpp/setup.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ Finally, download prebuilt webgpu static libraries and headers for `emdawnwebgpu
4949
```sh [wasm32:macOS/Linux]
5050
cd vtk
5151
CMAKE_CONFIGURATION="wasm32" cmake -P ./.gitlab/ci/download_dawn.cmake
52+
export emdawnwebgpu_dir="$PWD/.gitlab/dawn/lib/cmake/emdawnwebgpu"
5253
```
5354
```sh [wasm64:macOS/Linux]
5455
cd vtk
5556
CMAKE_CONFIGURATION="wasm64" cmake -P ./.gitlab/ci/download_dawn.cmake
57+
export emdawnwebgpu_dir="$PWD/.gitlab/dawn/lib/cmake/emdawnwebgpu"
5658
```
5759
```sh [wasm32:Windows]
5860
# In Powershell
@@ -81,7 +83,7 @@ emcmake cmake \
8183
-DCMAKE_BUILD_TYPE=Release \
8284
-DBUILD_SHARED_LIBS:BOOL=OFF \
8385
-DVTK_ENABLE_WEBGPU:BOOL=ON \
84-
-Demdawnwebgpu_DIR="$env:emdawnwebgpu_dir"
86+
-Demdawnwebgpu_DIR="$emdawnwebgpu_dir"
8587
cmake --build ./buildRelease
8688
cmake --install ./buildRelease --prefix ./installRelease
8789
```
@@ -94,7 +96,7 @@ emcmake cmake \
9496
-DBUILD_SHARED_LIBS:BOOL=OFF \
9597
-DVTK_ENABLE_WEBGPU:BOOL=ON \
9698
-DVTK_WEBASSEMBLY_64_BIT:BOOL=ON \
97-
-Demdawnwebgpu_DIR="$env:emdawnwebgpu_dir"
99+
-Demdawnwebgpu_DIR="$emdawnwebgpu_dir"
98100
cmake --build ./buildRelease
99101
cmake --install ./buildRelease --prefix ./installRelease
100102
```
@@ -107,7 +109,7 @@ emcmake cmake `
107109
-DCMAKE_BUILD_TYPE=Release `
108110
-DBUILD_SHARED_LIBS:BOOL=OFF `
109111
-DVTK_ENABLE_WEBGPU:BOOL=ON `
110-
-Demdawnwebgpu_DIR="$PWD\.gitlab\dawn\lib\cmake\emdawnwebgpu"
112+
-Demdawnwebgpu_DIR="$env:emdawnwebgpu_dir"
111113
cmake --build .\buildRelease
112114
cmake --install .\buildRelease --prefix .\installRelease
113115
```
@@ -121,7 +123,7 @@ emcmake cmake `
121123
-DBUILD_SHARED_LIBS:BOOL=OFF `
122124
-DVTK_ENABLE_WEBGPU:BOOL=ON `
123125
-DVTK_WEBASSEMBLY_64_BIT:BOOL=ON `
124-
-Demdawnwebgpu_DIR="$PWD\.gitlab\dawn\lib\cmake\emdawnwebgpu"
126+
-Demdawnwebgpu_DIR="$env:emdawnwebgpu_dir"
125127
cmake --build .\buildRelease
126128
cmake --install .\buildRelease --prefix .\installRelease
127129
```

0 commit comments

Comments
 (0)