Enable threads support on emscripten build.

mac-build
sigonasr2 4 months ago
parent e43798fa9a
commit 7bf1c90e77
  1. 2
      Adventures in Lestoria/Version.h
  2. 3
      CMakeLists.txt
  3. BIN
      x64/Release/Adventures in Lestoria.exe

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 3 #define VERSION_PATCH 3
#define VERSION_BUILD 10901 #define VERSION_BUILD 10910
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

@ -10,6 +10,7 @@ project("Adventures in Lestoria")
if (EMSCRIPTEN) if (EMSCRIPTEN)
add_compile_options("-s" "USE_FREETYPE=1") add_compile_options("-s" "USE_FREETYPE=1")
add_compile_options("-pthread")
endif() endif()
add_compile_options("-O2") add_compile_options("-O2")
@ -308,6 +309,8 @@ if (EMSCRIPTEN)
-sFETCH=1 -sFETCH=1
-sEXPORTED_RUNTIME_METHODS=stringToNewUTF8 -sEXPORTED_RUNTIME_METHODS=stringToNewUTF8
-std=c++2a -std=c++2a
-pthread
-sPTHREAD_POOL_SIZE=navigator.hardwareConcurrency
--proxy-to-worker --proxy-to-worker
--preload-file ${SOURCE_DATA_EMSCRIPTEN_DIR}@assets) --preload-file ${SOURCE_DATA_EMSCRIPTEN_DIR}@assets)
else() else()

Loading…
Cancel
Save