diff Resources/CMake/OrthancStone.cmake @ 114:3541fc81331a wasm

starting WebAssembly
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Sep 2017 16:11:52 +0200
parents 2eca030792aa
children
line wrap: on
line diff
--- a/Resources/CMake/OrthancStone.cmake	Wed Sep 20 15:32:32 2017 +0200
+++ b/Resources/CMake/OrthancStone.cmake	Wed Sep 20 16:11:52 2017 +0200
@@ -54,9 +54,12 @@
 ## Configure the Orthanc Framework
 #####################################################################
 
-if (NOT STONE_SANDBOXED)
+if (STONE_SANDBOXED)
+  UNSET(ENABLE_CURL CACHE)
+  UNSET(ENABLE_LOGGING CACHE)
+  UNSET(ENABLE_SDL CACHE)
+else()
   SET(ORTHANC_BOOST_COMPONENTS program_options)
-  SET(ENABLE_CURL ON)
   SET(ENABLE_CRYPTO_OPTIONS ON)
   SET(ENABLE_WEB_CLIENT ON)
 endif()
@@ -164,6 +167,15 @@
   link_libraries(mingw32)
 endif()
 
+if (STONE_SANDBOXED)
+  # Remove functions not suitable for a sandboxed environment
+  list(REMOVE_ITEM ORTHANC_CORE_SOURCES
+    ${ZLIB_SOURCES_DIR}/gzlib.c
+    ${ZLIB_SOURCES_DIR}/gzwrite.c
+    ${ZLIB_SOURCES_DIR}/gzread.c
+    )
+endif()
+
 
 
 #####################################################################