Browse Source

Merge pull request #1869 from enetheru/issue-1830

CMake: Fix missing -sUSE_PTHREADS=1 in web build
David Snopek 2 weeks ago
parent
commit
f47a4d5400
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cmake/web.cmake

+ 2 - 1
cmake/web.cmake

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