Skip to content

Commit 958cb8d

Browse files
committed
WGPU_PATH fix
1 parent 59f1779 commit 958cb8d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

examples/webgpu/triangle/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ endif()
3737

3838
# When WGPU_PATH changes, discard any previously auto-detected WGPU_LIB so
3939
# detection re-runs against the new path.
40-
if(NOT "${WGPU_PATH}" STREQUAL "${_WGPU_PATH_LAST}" AND _WGPU_LIB_AUTO)
40+
if(NOT "${WGPU_PATH}" STREQUAL "${_WGPU_PATH_LAST}")
4141
unset(WGPU_LIB CACHE)
4242
set(WGPU_LIB "" CACHE STRING "WebGPU library name (wgpu_native or webgpu_dawn); auto-detected if empty")
4343
endif()
4444
set(_WGPU_PATH_LAST "${WGPU_PATH}" CACHE INTERNAL "")
4545

4646
if(NOT WGPU_LIB)
47-
# Always unset the find_library results so they re-probe the current WGPU_PATH.
4847
unset(_WGPU_NATIVE_LIB CACHE)
4948
unset(_WEBGPU_DAWN_LIB CACHE)
5049
find_library(_WGPU_NATIVE_LIB NAMES wgpu_native wgpu_native.dll PATHS "${WGPU_PATH}/lib" NO_DEFAULT_PATH)
@@ -56,10 +55,7 @@ if(NOT WGPU_LIB)
5655
else()
5756
message(FATAL_ERROR "Could not detect a WebGPU library in ${WGPU_PATH}/lib. Set WGPU_LIB explicitly (wgpu_native or webgpu_dawn).")
5857
endif()
59-
set(_WGPU_LIB_AUTO TRUE CACHE INTERNAL "")
6058
message(STATUS "WebGPU library auto-detected: ${WGPU_LIB}")
61-
else()
62-
set(_WGPU_LIB_AUTO FALSE CACHE INTERNAL "")
6359
endif()
6460

6561
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)