diff Applications/StoneWebViewer/WebAssembly/CMakeLists.txt @ 2081:3ef91da06636

fix compatibility with Emscripten 3.1.47
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Oct 2023 16:38:38 +0200
parents 07964689cb0b
children a6d5373e471c 352cb0fa57b2
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Mon Aug 14 10:36:35 2023 +0200
+++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Wed Oct 11 16:38:38 2023 +0200
@@ -36,7 +36,7 @@
   set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1")
 endif()
 
-set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
+set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456")  # 256MB + resize
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1")
@@ -56,6 +56,7 @@
 SET(ENABLE_DCMTK_TRANSCODING OFF)
 SET(ENABLE_GOOGLE_TEST OFF)
 SET(ENABLE_LOCALE ON)  # Necessary for text rendering
+SET(ENABLE_MODULE_JOBS OFF)
 SET(ENABLE_PUGIXML ON) # Necessary for OsiriX annotations
 SET(ORTHANC_SANDBOXED ON)
 
@@ -93,7 +94,7 @@
 # Create the wrapper to call C++ from JavaScript
 # ---------------------------------------------------------------
 
-set(LIBCLANG "libclang-4.0.so.1" CACHE PATH "Version of clang to generate the code model")
+set(LIBCLANG "libclang.so.1" CACHE PATH "Version of clang to generate the code model")
 set(STONE_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/stone.js)
 
 include(FindPython3 OPTIONAL RESULT_VARIABLE HAS_CMAKE_PYTHON3)
@@ -134,6 +135,9 @@
   StoneWebViewer.cpp
   )
 
+# Boost::Math begs for -std=c++14 since Boost 1.82.0
+set_property(TARGET StoneWebViewer PROPERTY CXX_STANDARD 14)
+
 DefineSourceBasenameForTarget(StoneWebViewer)
 
 set_target_properties(StoneWebViewer