Skip to content

Commit b92fb26

Browse files
thewtexhjmjohnson
authored andcommitted
Define NIFTI_SYSTEM_MATH_LIB for Emscripten
System introspection does not work the same way with Emscripten on the WASI SDK, so provide the library explicitly.
1 parent cba238f commit b92fb26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ endif()
150150

151151
#######################################################################
152152
# Find unix math libraries
153-
if(NOT WIN32)
153+
if(EMSCRIPTEN OR WASI)
154+
set(NIFTI_SYSTEM_MATH_LIB m)
155+
elseif(NOT WIN32)
154156
find_library(NIFTI_SYSTEM_MATH_LIB m)
155157
else()
156158
set(NIFTI_SYSTEM_MATH_LIB "")

0 commit comments

Comments
 (0)