Skip to content

Commit 42b03da

Browse files
committed
CMake: Fix missing -sUSE_PTHREADS=1 in web build
- add -sUSE_PTHREADS=1 to link flags - add =1 to sSIDE_MODULE=1 in compile flags to match scons.
1 parent 5910c0e commit 42b03da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/web.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function(web_generate)
2121
target_compile_options(
2222
godot-cpp
2323
PUBLIC #
24-
-sSIDE_MODULE
24+
-sSIDE_MODULE=1
2525
-sSUPPORT_LONGJMP=wasm
2626
$<${THREADS_ENABLED}:-sUSE_PTHREADS=1>
2727
)
@@ -33,6 +33,7 @@ function(web_generate)
3333
-sSUPPORT_LONGJMP=wasm
3434
-fvisibility=hidden
3535
-shared
36+
$<${THREADS_ENABLED}:-sUSE_PTHREADS=1>
3637
)
3738

3839
common_compiler_flags()

0 commit comments

Comments
 (0)