Mercurial > hg > orthanc-stone
comparison OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake @ 1541:ae17c8c8838f
standalone compilation of unit tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2020 13:47:24 +0200 |
parents | 82279abb92d0 |
children | 94750ef63ad5 |
comparison
equal
deleted
inserted
replaced
1540:e20a2381200d | 1541:ae17c8c8838f |
---|---|
72 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | 72 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
73 message(FATAL_ERROR "WebAssembly target requires the emscripten compiler") | 73 message(FATAL_ERROR "WebAssembly target requires the emscripten compiler") |
74 endif() | 74 endif() |
75 | 75 |
76 set(ENABLE_THREADS OFF) | 76 set(ENABLE_THREADS OFF) |
77 set(ENABLE_WEB_CLIENT OFF) | |
77 add_definitions(-DORTHANC_ENABLE_WASM=1) | 78 add_definitions(-DORTHANC_ENABLE_WASM=1) |
78 else() | 79 else() |
79 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR | 80 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR |
80 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR | 81 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
81 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR | 82 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
101 | 102 |
102 ##################################################################### | 103 ##################################################################### |
103 ## Configure optional third-party components | 104 ## Configure optional third-party components |
104 ##################################################################### | 105 ##################################################################### |
105 | 106 |
106 if (NOT ORTHANC_SANDBOXED) | 107 if (ENABLE_WEB_CLIENT) |
107 list(APPEND ORTHANC_STONE_SOURCES | 108 list(APPEND ORTHANC_STONE_SOURCES |
108 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp | 109 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp |
109 ) | 110 ) |
110 endif() | 111 endif() |
111 | 112 |
211 | 212 |
212 ##################################################################### | 213 ##################################################################### |
213 ## All the source files required to build Stone of Orthanc | 214 ## All the source files required to build Stone of Orthanc |
214 ##################################################################### | 215 ##################################################################### |
215 | 216 |
216 if (NOT ORTHANC_SANDBOXED) | 217 if (ENABLE_SDL) |
217 set(PLATFORM_SOURCES | 218 list(APPEND ORTHANC_STONE_SOURCES |
218 ${ORTHANC_STONE_ROOT}/Sources/Loaders/GenericLoadersContext.cpp | 219 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlWindow.cpp |
219 ${ORTHANC_STONE_ROOT}/Sources/Loaders/GenericLoadersContext.h | 220 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlWindow.h |
220 ) | 221 ) |
221 | 222 |
222 if (ENABLE_SDL) | 223 if (ENABLE_OPENGL) |
223 list(APPEND ORTHANC_STONE_SOURCES | 224 list(APPEND ORTHANC_STONE_SOURCES |
224 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlWindow.cpp | 225 ${ORTHANC_STONE_ROOT}/Sources/OpenGL/SdlOpenGLContext.cpp |
225 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlWindow.h | 226 ${ORTHANC_STONE_ROOT}/Sources/OpenGL/SdlOpenGLContext.h |
227 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlViewport.cpp | |
228 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlViewport.h | |
226 ) | 229 ) |
227 endif() | |
228 | |
229 if (ENABLE_SDL) | |
230 if (ENABLE_OPENGL) | |
231 list(APPEND ORTHANC_STONE_SOURCES | |
232 ${ORTHANC_STONE_ROOT}/Sources/OpenGL/SdlOpenGLContext.cpp | |
233 ${ORTHANC_STONE_ROOT}/Sources/OpenGL/SdlOpenGLContext.h | |
234 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlViewport.cpp | |
235 ${ORTHANC_STONE_ROOT}/Sources/Viewport/SdlViewport.h | |
236 ) | |
237 endif() | |
238 endif() | 230 endif() |
239 endif() | 231 endif() |
240 | 232 |
241 | 233 |
242 if (ENABLE_DCMTK) | 234 if (ENABLE_DCMTK) |
245 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/ParsedDicomCache.cpp | 237 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/ParsedDicomCache.cpp |
246 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/ParsedDicomDataset.cpp | 238 ${ORTHANC_STONE_ROOT}/Sources/Toolbox/ParsedDicomDataset.cpp |
247 ) | 239 ) |
248 endif() | 240 endif() |
249 | 241 |
250 if (ENABLE_THREADS) | 242 |
243 if (NOT ORTHANC_SANDBOXED AND ENABLE_THREADS AND ENABLE_WEB_CLIENT) | |
251 list(APPEND ORTHANC_STONE_SOURCES | 244 list(APPEND ORTHANC_STONE_SOURCES |
245 ${ORTHANC_STONE_ROOT}/Sources/Loaders/GenericLoadersContext.cpp | |
246 ${ORTHANC_STONE_ROOT}/Sources/Loaders/GenericLoadersContext.h | |
247 ${ORTHANC_STONE_ROOT}/Sources/Oracle/GenericOracleRunner.cpp | |
252 ${ORTHANC_STONE_ROOT}/Sources/Oracle/ThreadedOracle.cpp | 248 ${ORTHANC_STONE_ROOT}/Sources/Oracle/ThreadedOracle.cpp |
253 ${ORTHANC_STONE_ROOT}/Sources/Oracle/GenericOracleRunner.cpp | |
254 ) | 249 ) |
255 endif() | 250 endif() |
256 | 251 |
257 | 252 |
258 if (ENABLE_WASM) | 253 if (ENABLE_WASM) |