# HG changeset patch # User Sebastien Jodogne # Date 1505917707 -7200 # Node ID f0cfacd0c9b85810fa4f8e8938f7e47ea40ff8e2 # Parent 85a22aad7dfe97ef8a156b53ee738532c4f1599b Orthanc framework: ORTHANC_SANDBOXED parameter diff -r 85a22aad7dfe -r f0cfacd0c9b8 Resources/CMake/Compiler.cmake --- a/Resources/CMake/Compiler.cmake Fri Sep 15 13:07:06 2017 +0200 +++ b/Resources/CMake/Compiler.cmake Wed Sep 20 16:28:27 2017 +0200 @@ -179,6 +179,9 @@ message(FATAL_ERROR "Please install the uuid-dev package") endif() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + message("Building using Emscripten (for WebAssembly or asm.js targets)") + else() message(FATAL_ERROR "Support your platform here") endif() diff -r 85a22aad7dfe -r f0cfacd0c9b8 Resources/CMake/OrthancFrameworkConfiguration.cmake --- a/Resources/CMake/OrthancFrameworkConfiguration.cmake Fri Sep 15 13:07:06 2017 +0200 +++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake Wed Sep 20 16:28:27 2017 +0200 @@ -402,11 +402,17 @@ -DORTHANC_ENABLE_LOGGING_PLUGIN=0 -DORTHANC_ENABLE_MD5=1 -DORTHANC_MAXIMUM_TAG_LENGTH=256 - -DORTHANC_SANDBOXED=0 -DORTHANC_VERSION="${ORTHANC_VERSION}" ) +if (ORTHANC_SANDBOXED) + add_definitions(-DORTHANC_SANDBOXED=1) +else() + add_definitions(-DORTHANC_SANDBOXED=0) +endif() + + if (HAS_EMBEDDED_RESOURCES) add_definitions(-DORTHANC_HAS_EMBEDDED_RESOURCES=1) diff -r 85a22aad7dfe -r f0cfacd0c9b8 Resources/CMake/OrthancFrameworkParameters.cmake --- a/Resources/CMake/OrthancFrameworkParameters.cmake Fri Sep 15 13:07:06 2017 +0200 +++ b/Resources/CMake/OrthancFrameworkParameters.cmake Wed Sep 20 16:28:27 2017 +0200 @@ -91,3 +91,6 @@ set(HAS_EMBEDDED_RESOURCES OFF CACHE INTERNAL "Whether resources are auto-generated using EmbedResources.py") + +set(ORTHANC_SANDBOXED OFF CACHE INTERNAL + "Whether Orthanc runs inside a sandboxed environment (such as Google NaCl or WebAssembly)")