Mercurial > hg > orthanc-stone
comparison Platforms/WebAssembly/CMakeLists.txt @ 115:f598ffb81cda wasm
fix sandboxed build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 Sep 2017 17:02:58 +0200 |
parents | 3541fc81331a |
children | c993693e9e63 |
comparison
equal
deleted
inserted
replaced
114:3541fc81331a | 115:f598ffb81cda |
---|---|
4 | 4 |
5 cmake_minimum_required(VERSION 2.8.3) | 5 cmake_minimum_required(VERSION 2.8.3) |
6 | 6 |
7 | 7 |
8 ##################################################################### | 8 ##################################################################### |
9 ## Configuration of Emscripten for WebAssembly target | 9 ## Configuration of the Emscripten compiler for WebAssembly target |
10 ##################################################################### | 10 ##################################################################### |
11 | 11 |
12 set(WASM_FLAGS "-s WASM=1") | 12 set(WASM_FLAGS "-s WASM=1") |
13 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WASM_FLAGS}") | 13 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WASM_FLAGS}") |
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WASM_FLAGS}") | 14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WASM_FLAGS}") |
22 | 22 |
23 # To debug exceptions | 23 # To debug exceptions |
24 #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=2") | 24 #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=2") |
25 | 25 |
26 | 26 |
27 | |
28 ##################################################################### | 27 ##################################################################### |
29 ## Build a static library containing the Orthanc Stone framework | 28 ## Build a static library containing the Orthanc Stone framework |
30 ##################################################################### | 29 ##################################################################### |
31 | 30 |
32 SET(STONE_SANDBOXED ON) | 31 include(../../Resources/CMake/OrthancStoneParameters.cmake) |
33 include(../../Resources/CMake/OrthancStone.cmake) | 32 |
33 SET(ORTHANC_SANDBOXED ON) | |
34 SET(ENABLE_SDL OFF) | |
35 | |
36 include(../../Resources/CMake/OrthancStoneConfiguration.cmake) | |
37 | |
34 add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES}) | 38 add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES}) |
39 | |
40 | |
41 | |
42 | |
43 | |
35 | 44 |
36 # Regenerate a dummy "library.c" file each time the "library.js" file | 45 # Regenerate a dummy "library.c" file each time the "library.js" file |
37 # is modified, so as to force a new execution of the linking | 46 # is modified, so as to force a new execution of the linking |
38 add_custom_command( | 47 add_custom_command( |
39 OUTPUT "${AUTOGENERATED_DIR}/library.c" | 48 OUTPUT "${AUTOGENERATED_DIR}/library.c" |