# HG changeset patch # User Sebastien Jodogne # Date 1597345255 -7200 # Node ID 012ab2c1f23b34119af14b1b39438fde59de9ff4 # Parent a48ae10857b12900c158b15d767fa58c5dfba6db notes diff -r a48ae10857b1 -r 012ab2c1f23b OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt --- a/OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt Thu Aug 13 15:56:01 2020 +0200 +++ b/OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt Thu Aug 13 21:00:55 2020 +0200 @@ -2,6 +2,14 @@ project(OrthancStoneModule) + +# Warning message related to WebAssembly modules: We know that 1.38.41 +# DOES NOT work, but that 1.39.17 works. +message("") +message("=== IMPORTANT: Make sure to use a recent version of Emscripten (preferably >= 2.0.0) ===") +message("") + + set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../wasm-binaries/OrthancStoneModule" CACHE PATH "Where to put the WebAssembly binaries") @@ -51,7 +59,7 @@ # The source files that register a callback cannot be part of a side # module, and must be compiled in the main module. The following # command can be used to identify such files: -# $ grep -l -r emscripten_ ../../Sources/ +# $ grep -lrE 'emscripten_' ../../Sources/ set(SOURCES_WITH_EMSCRIPTEN_CALLBACKS ${ORTHANC_STONE_ROOT}/Sources/Oracle/WebAssemblyOracle.cpp diff -r a48ae10857b1 -r 012ab2c1f23b OrthancStone/SharedLibrary/WebAssembly/NOTES.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OrthancStone/SharedLibrary/WebAssembly/NOTES.txt Thu Aug 13 21:00:55 2020 +0200 @@ -0,0 +1,18 @@ + +Install Emscripten: +https://emscripten.org/docs/getting_started/downloads.html + +# cd ~/Downloads +# git clone https://github.com/emscripten-core/emsdk.git +# cd emsdk +# ./emsdk install 2.0.0 +# ./emsdk activate 2.0.0 + + +Then, if the installation path was "~/Downloads/emsdk/": + +# source ~/Downloads/emsdk/emsdk_env.sh +# cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DALLOW_DOWNLOADS=ON -G Ninja +# ninja install + +=> The binaries will be put in "../../../../wasm-binaries/"