Mercurial > hg > orthanc-stone
comparison Resources/CMake/OrthancStoneConfiguration.cmake @ 755:4a3b96630e6c
Merge from default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 May 2019 16:17:32 +0200 |
parents | 92c400a09f1b f3a7092ed10e |
children | 55411e7da2f7 66ac7a2d1e3a |
comparison
equal
deleted
inserted
replaced
754:92c400a09f1b | 755:4a3b96630e6c |
---|---|
63 | 63 |
64 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | 64 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
65 message(FATAL_ERROR "WebAssembly target requires the emscripten compiler") | 65 message(FATAL_ERROR "WebAssembly target requires the emscripten compiler") |
66 endif() | 66 endif() |
67 | 67 |
68 set(ENABLE_THREADS OFF) | |
68 add_definitions(-DORTHANC_ENABLE_WASM=1) | 69 add_definitions(-DORTHANC_ENABLE_WASM=1) |
69 else() | 70 else() |
70 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR | 71 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR |
71 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR | 72 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
72 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR | 73 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
73 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") | 74 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
74 message(FATAL_ERROR "Trying to use a Web compiler for a native build") | 75 message(FATAL_ERROR "Trying to use a Web compiler for a native build") |
75 endif() | 76 endif() |
76 | 77 |
78 set(ENABLE_THREADS ON) | |
77 add_definitions(-DORTHANC_ENABLE_WASM=0) | 79 add_definitions(-DORTHANC_ENABLE_WASM=0) |
78 endif() | 80 endif() |
79 | 81 |
80 | 82 |
81 ##################################################################### | 83 ##################################################################### |
107 message("SDL and QT may not be defined together") | 109 message("SDL and QT may not be defined together") |
108 elseif(ENABLE_SDL) | 110 elseif(ENABLE_SDL) |
109 message("SDL is enabled") | 111 message("SDL is enabled") |
110 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) | 112 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) |
111 add_definitions( | 113 add_definitions( |
112 -DORTHANC_ENABLE_THREADS=1 | |
113 -DORTHANC_ENABLE_QT=0 | 114 -DORTHANC_ENABLE_QT=0 |
114 -DORTHANC_ENABLE_SDL=1 | 115 -DORTHANC_ENABLE_SDL=1 |
115 ) | 116 ) |
116 elseif(ENABLE_QT) | 117 elseif(ENABLE_QT) |
117 message("QT is enabled") | 118 message("QT is enabled") |
118 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake) | 119 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake) |
119 add_definitions( | 120 add_definitions( |
120 -DORTHANC_ENABLE_THREADS=1 | |
121 -DORTHANC_ENABLE_QT=1 | 121 -DORTHANC_ENABLE_QT=1 |
122 -DORTHANC_ENABLE_SDL=0 | 122 -DORTHANC_ENABLE_SDL=0 |
123 ) | 123 ) |
124 else() | 124 else() |
125 message("SDL and QT are both disabled") | 125 message("SDL and QT are both disabled") |
126 unset(USE_SYSTEM_SDL CACHE) | 126 unset(USE_SYSTEM_SDL CACHE) |
127 add_definitions( | 127 add_definitions( |
128 -DORTHANC_ENABLE_SDL=0 | 128 -DORTHANC_ENABLE_SDL=0 |
129 -DORTHANC_ENABLE_QT=0 | 129 -DORTHANC_ENABLE_QT=0 |
130 -DORTHANC_ENABLE_THREADS=0 | 130 ) |
131 ) | 131 endif() |
132 | |
133 | |
134 if (ENABLE_THREADS) | |
135 add_definitions(-DORTHANC_ENABLE_THREADS=1) | |
136 else() | |
137 add_definitions(-DORTHANC_ENABLE_THREADS=0) | |
132 endif() | 138 endif() |
133 | 139 |
134 | 140 |
135 if (ENABLE_OPENGL AND CMAKE_SYSTEM_NAME STREQUAL "Windows") | 141 if (ENABLE_OPENGL AND CMAKE_SYSTEM_NAME STREQUAL "Windows") |
136 include(${CMAKE_CURRENT_LIST_DIR}/GlewConfiguration.cmake) | 142 include(${CMAKE_CURRENT_LIST_DIR}/GlewConfiguration.cmake) |
350 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.cpp | 356 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.cpp |
351 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.cpp | 357 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.cpp |
352 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.cpp | 358 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.cpp |
353 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.cpp | 359 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.cpp |
354 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h | 360 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h |
361 ) | |
362 endif() | |
363 | |
364 | |
365 if (ENABLE_THREADS) | |
366 list(APPEND ORTHANC_STONE_SOURCES | |
367 ${ORTHANC_STONE_ROOT}/Framework/Oracle/ThreadedOracle.cpp | |
355 ) | 368 ) |
356 endif() | 369 endif() |
357 | 370 |
358 | 371 |
359 list(APPEND ORTHANC_STONE_SOURCES | 372 list(APPEND ORTHANC_STONE_SOURCES |
432 ${ORTHANC_STONE_ROOT}/Framework/Messages/Promise.h | 445 ${ORTHANC_STONE_ROOT}/Framework/Messages/Promise.h |
433 ${ORTHANC_STONE_ROOT}/Framework/Oracle/GetOrthancImageCommand.cpp | 446 ${ORTHANC_STONE_ROOT}/Framework/Oracle/GetOrthancImageCommand.cpp |
434 ${ORTHANC_STONE_ROOT}/Framework/Oracle/GetOrthancWebViewerJpegCommand.cpp | 447 ${ORTHANC_STONE_ROOT}/Framework/Oracle/GetOrthancWebViewerJpegCommand.cpp |
435 ${ORTHANC_STONE_ROOT}/Framework/Oracle/OracleCommandWithPayload.cpp | 448 ${ORTHANC_STONE_ROOT}/Framework/Oracle/OracleCommandWithPayload.cpp |
436 ${ORTHANC_STONE_ROOT}/Framework/Oracle/OrthancRestApiCommand.cpp | 449 ${ORTHANC_STONE_ROOT}/Framework/Oracle/OrthancRestApiCommand.cpp |
437 ${ORTHANC_STONE_ROOT}/Framework/Oracle/ThreadedOracle.cpp | |
438 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyAlphaLayer.cpp | 450 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyAlphaLayer.cpp |
439 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyDicomLayer.cpp | 451 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyDicomLayer.cpp |
440 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayer.cpp | 452 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayer.cpp |
441 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerCropTracker.cpp | 453 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerCropTracker.cpp |
442 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMaskTracker.cpp | 454 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMaskTracker.cpp |