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.

(cherry picked from commit 42b03da2b1)
This commit is contained in:
Samuel Nicholas
2025-10-19 15:21:24 +10:30
committed by David Snopek
parent 7b0ee7466f
commit a7378c589f

View File

@@ -21,7 +21,7 @@ function(web_generate)
target_compile_options(
godot-cpp
PUBLIC #
-sSIDE_MODULE
-sSIDE_MODULE=1
-sSUPPORT_LONGJMP=wasm
$<${THREADS_ENABLED}:-sUSE_PTHREADS=1>
)
@@ -33,6 +33,7 @@ function(web_generate)
-sSUPPORT_LONGJMP=wasm
-fvisibility=hidden
-shared
$<${THREADS_ENABLED}:-sUSE_PTHREADS=1>
)
common_compiler_flags()