Skip to content

Commit 39b40b8

Browse files
add filetype check for linux system
1 parent cb9239d commit 39b40b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmake/gpu.cmake

+6-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ else()
6161
# if not found, try download from release
6262
else()
6363
message("libdawn not found, try downloading from the release")
64+
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
65+
set(libdawn_ext "dylib")
66+
elseif(UNIX)
67+
set(libdawn_ext "so")
68+
endif()
6469
FetchContent_Declare(
6570
libdawn
66-
URL https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.dylib
71+
URL https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.${libdawn_ext}
6772
DOWNLOAD_NO_EXTRACT TRUE
6873
SOURCE_DIR "${TARGET_FILE_PATH}/third_party/lib")
6974
FetchContent_MakeAvailable(libdawn)

0 commit comments

Comments
 (0)