File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ file(TOUCH "${PROJECTM_DUMMY_SOURCE_FILE}")
60
60
61
61
if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
62
62
set (ENABLE_EMSCRIPTEN ON CACHE BOOL "Build for web with emscripten. Will also build the SDL2-based entrypoint." FORCE)
63
+ option (USE_PTHREADS "Enable multithreading support" OFF )
63
64
else ()
64
65
set (ENABLE_EMSCRIPTEN OFF CACHE BOOL "Build for web with emscripten. Requires emscripten toolset for building." FORCE)
65
66
endif ()
@@ -122,6 +123,11 @@ if(ENABLE_EMSCRIPTEN)
122
123
"SHELL:-s NO_DISABLE_EXCEPTION_CATCHING"
123
124
)
124
125
126
+ if (USE_PTHREADS)
127
+ add_compile_options ("SHELL:-s USE_PTHREADS=1" )
128
+ add_link_options ("SHELL:-s USE_PTHREADS=1" )
129
+ endif ()
130
+
125
131
set (USE_GLES ON )
126
132
else ()
127
133
if (ENABLE_SDL_UI)
@@ -242,6 +248,9 @@ if(ENABLE_SDL_UI)
242
248
endif ()
243
249
message (STATUS " OpenGL ES: ${ENABLE_GLES} " )
244
250
message (STATUS " Emscripten: ${ENABLE_EMSCRIPTEN} " )
251
+ if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
252
+ message (STATUS " - PThreads: ${USE_PTHREADS} " )
253
+ endif ()
245
254
message (STATUS " Use system GLM: ${ENABLE_SYSTEM_GLM} " )
246
255
message (STATUS " Link UI with shared lib: ${ENABLE_SHARED_LINKING} " )
247
256
message (STATUS "" )
You can’t perform that action at this time.
0 commit comments