File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,14 @@ Overwrite Shared Library Properties to allow shared libs to be generated.
2525]=======================================================================]
2626if (EMSCRIPTEN)
2727 set_property (GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE )
28- set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-sSIDE_MODULE=1" )
29- set (CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-sSIDE_MODULE=1" )
30- set (CMAKE_SHARED_LIBRARY_SUFFIX ) # remove the suffix from the shared lib
31- set (CMAKE_STRIP FALSE ) # used by default in pybind11 on .so modules
28+ set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-sSIDE_MODULE=1" CACHE INTERNAL "" )
29+ set (CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-sSIDE_MODULE=1" CACHE INTERNAL "" )
30+ set (CMAKE_SHARED_LIBRARY_SUFFIX "" CACHE INTERNAL "" ) # remove the suffix from the shared lib
31+ set (CMAKE_STRIP FALSE "" CACHE INTERNAL "" ) # used by default in pybind11 on .so modules
3232
3333 # The Emscripten toolchain sets the default value for EMSCRIPTEN_SYSTEM_PROCESSOR to x86
3434 # and copies that to CMAKE_SYSTEM_PROCESSOR. We don't want that.
35- set (CMAKE_SYSTEM_PROCESSOR "wasm32" )
35+ set (CMAKE_SYSTEM_PROCESSOR "wasm32" CACHE INTERNAL "" )
3636 # the above prevents the need for logic like:
3737 #if( ${CMAKE_SYSTEM_NAME} STREQUAL Emscripten )
3838 # set( SYSTEM_ARCH wasm32 )
Original file line number Diff line number Diff 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()
You can’t perform that action at this time.
0 commit comments