Mercurial > hg > orthanc-stone
comparison Resources/CMake/OrthancStone.cmake @ 22:b01d46e5a2b3
support for sandboxed environments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 12:08:15 +0100 |
parents | 20f623762e8e |
children | 99b833843ba9 |
comparison
equal
deleted
inserted
replaced
21:20f623762e8e | 22:b01d46e5a2b3 |
---|---|
6 ##################################################################### | 6 ##################################################################### |
7 | 7 |
8 # Generic parameters | 8 # Generic parameters |
9 SET(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") | 9 SET(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") |
10 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages") | 10 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages") |
11 SET(STONE_SANDBOXED OFF CACHE BOOL "Whether Stone runs inside a sandboxed environment (such as Google NaCl)") | |
11 | 12 |
12 # Optional components | 13 # Optional components |
13 SET(ENABLE_CURL ON CACHE BOOL "Include support for libcurl") | 14 SET(ENABLE_CURL ON CACHE BOOL "Include support for libcurl") |
14 SET(ENABLE_SSL OFF CACHE BOOL "Include support for SSL") | 15 SET(ENABLE_SSL OFF CACHE BOOL "Include support for SSL") |
15 SET(ENABLE_SDL ON CACHE BOOL "Include support for SDL") | 16 SET(ENABLE_SDL ON CACHE BOOL "Include support for SDL") |
57 | 58 |
58 ##################################################################### | 59 ##################################################################### |
59 ## Configure optional third-party components | 60 ## Configure optional third-party components |
60 ##################################################################### | 61 ##################################################################### |
61 | 62 |
62 if (ENABLE_LOGGING) | 63 if (STONE_SANDBOXED) |
63 add_definitions(-DORTHANC_ENABLE_LOGGING=1) | 64 add_definitions( |
65 -DORTHANC_ENABLE_CURL=0 | |
66 -DORTHANC_ENABLE_LOGGING=0 | |
67 -DORTHANC_ENABLE_SDL=0 | |
68 -DORTHANC_ENABLE_SSL=0 | |
69 -DORTHANC_SANDBOXED=1 | |
70 ) | |
64 else() | 71 else() |
65 add_definitions(-DORTHANC_ENABLE_LOGGING=0) | 72 list(APPEND ORTHANC_STONE_SOURCES |
66 endif() | 73 ${ORTHANC_ROOT}/Core/HttpClient.cpp |
67 | 74 ${ORTHANC_ROOT}/Core/SystemToolbox.cpp |
68 if (ENABLE_SDL) | 75 ) |
69 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) | 76 |
70 add_definitions(-DORTHANC_ENABLE_SDL=1) | 77 add_definitions( |
71 else() | 78 -DORTHANC_SANDBOXED=0 |
72 add_definitions(-DORTHANC_ENABLE_SDL=0) | 79 ) |
73 endif() | 80 |
74 | 81 if (ENABLE_LOGGING) |
75 if (ENABLE_CURL) | 82 add_definitions(-DORTHANC_ENABLE_LOGGING=1) |
76 add_definitions(-DORTHANC_ENABLE_CURL=1) | |
77 include(${ORTHANC_ROOT}/Resources/CMake/LibCurlConfiguration.cmake) | |
78 | |
79 if (ENABLE_SSL) | |
80 set(ENABLE_PKCS11 OFF) | |
81 add_definitions(-DORTHANC_ENABLE_SSL=1) | |
82 include(${ORTHANC_ROOT}/Resources/CMake/OpenSslConfiguration.cmake) | |
83 else() | 83 else() |
84 add_definitions(-DORTHANC_ENABLE_SSL=0) | 84 add_definitions(-DORTHANC_ENABLE_LOGGING=0) |
85 endif() | 85 endif() |
86 else() | 86 |
87 add_definitions( | 87 if (ENABLE_SDL) |
88 -DORTHANC_ENABLE_SSL=0 | 88 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) |
89 -DORTHANC_ENABLE_CURL=0 | 89 add_definitions(-DORTHANC_ENABLE_SDL=1) |
90 ) | 90 else() |
91 add_definitions(-DORTHANC_ENABLE_SDL=0) | |
92 endif() | |
93 | |
94 if (ENABLE_CURL) | |
95 add_definitions(-DORTHANC_ENABLE_CURL=1) | |
96 include(${ORTHANC_ROOT}/Resources/CMake/LibCurlConfiguration.cmake) | |
97 | |
98 if (ENABLE_SSL) | |
99 set(ENABLE_PKCS11 OFF) | |
100 add_definitions(-DORTHANC_ENABLE_SSL=1) | |
101 include(${ORTHANC_ROOT}/Resources/CMake/OpenSslConfiguration.cmake) | |
102 else() | |
103 add_definitions(-DORTHANC_ENABLE_SSL=0) | |
104 endif() | |
105 else() | |
106 add_definitions( | |
107 -DORTHANC_ENABLE_SSL=0 | |
108 -DORTHANC_ENABLE_CURL=0 | |
109 ) | |
110 endif() | |
91 endif() | 111 endif() |
92 | 112 |
93 add_definitions( | 113 add_definitions( |
94 -DORTHANC_ENABLE_MD5=0 | 114 -DORTHANC_ENABLE_MD5=0 |
95 -DORTHANC_ENABLE_BASE64=1 | 115 -DORTHANC_ENABLE_BASE64=1 |
178 | 198 |
179 ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp | 199 ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp |
180 ${ORTHANC_ROOT}/Core/Compression/DeflateBaseCompressor.cpp | 200 ${ORTHANC_ROOT}/Core/Compression/DeflateBaseCompressor.cpp |
181 ${ORTHANC_ROOT}/Core/Compression/GzipCompressor.cpp | 201 ${ORTHANC_ROOT}/Core/Compression/GzipCompressor.cpp |
182 ${ORTHANC_ROOT}/Core/Enumerations.cpp | 202 ${ORTHANC_ROOT}/Core/Enumerations.cpp |
183 ${ORTHANC_ROOT}/Core/HttpClient.cpp | |
184 ${ORTHANC_ROOT}/Core/Images/Image.cpp | 203 ${ORTHANC_ROOT}/Core/Images/Image.cpp |
185 ${ORTHANC_ROOT}/Core/Images/ImageAccessor.cpp | 204 ${ORTHANC_ROOT}/Core/Images/ImageAccessor.cpp |
186 ${ORTHANC_ROOT}/Core/Images/ImageBuffer.cpp | 205 ${ORTHANC_ROOT}/Core/Images/ImageBuffer.cpp |
187 ${ORTHANC_ROOT}/Core/Images/ImageProcessing.cpp | 206 ${ORTHANC_ROOT}/Core/Images/ImageProcessing.cpp |
188 ${ORTHANC_ROOT}/Core/Images/JpegErrorManager.cpp | 207 ${ORTHANC_ROOT}/Core/Images/JpegErrorManager.cpp |
189 ${ORTHANC_ROOT}/Core/Images/JpegReader.cpp | 208 ${ORTHANC_ROOT}/Core/Images/JpegReader.cpp |
190 ${ORTHANC_ROOT}/Core/Images/PngReader.cpp | 209 ${ORTHANC_ROOT}/Core/Images/PngReader.cpp |
191 ${ORTHANC_ROOT}/Core/Logging.cpp | 210 ${ORTHANC_ROOT}/Core/Logging.cpp |
192 ${ORTHANC_ROOT}/Core/SystemToolbox.cpp | |
193 ${ORTHANC_ROOT}/Core/Toolbox.cpp | 211 ${ORTHANC_ROOT}/Core/Toolbox.cpp |
194 ${ORTHANC_ROOT}/Core/WebServiceParameters.cpp | 212 ${ORTHANC_ROOT}/Core/WebServiceParameters.cpp |
195 ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp | 213 ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp |
196 | 214 |
197 ${AUTOGENERATED_SOURCES} | 215 ${AUTOGENERATED_SOURCES} |