comparison Resources/CMake/OrthancStoneConfiguration.cmake @ 1397:1c2d065ba372

cleanup
author Alain Mazy <alain@mazy.be>
date Wed, 29 Apr 2020 20:41:36 +0200
parents dd2b75ee644b
children 5630c2fb7b0f
comparison
equal deleted inserted replaced
1396:dd2b75ee644b 1397:1c2d065ba372
45 45
46 if (ENABLE_SDL) 46 if (ENABLE_SDL)
47 message(FATAL_ERROR "Cannot enable SDL in sandboxed environments") 47 message(FATAL_ERROR "Cannot enable SDL in sandboxed environments")
48 endif() 48 endif()
49 49
50 if (ENABLE_QT)
51 message(FATAL_ERROR "Cannot enable QT in sandboxed environments")
52 endif()
53
54 if (ENABLE_SSL) 50 if (ENABLE_SSL)
55 message(FATAL_ERROR "Cannot enable SSL in sandboxed environments") 51 message(FATAL_ERROR "Cannot enable SSL in sandboxed environments")
56 endif() 52 endif()
57 endif() 53 endif()
58 54
59 if (ENABLE_OPENGL) 55 if (ENABLE_OPENGL)
60 if (NOT ENABLE_QT AND NOT ENABLE_SDL AND NOT ENABLE_WASM) 56 if (NOT ENABLE_SDL AND NOT ENABLE_WASM)
61 message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly, SDL and Qt are all disabled") 57 message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly and SDL are both disabled")
62 endif() 58 endif()
63 endif() 59 endif()
64 60
65 if (ENABLE_WASM) 61 if (ENABLE_WASM)
66 if (NOT ORTHANC_SANDBOXED) 62 if (NOT ORTHANC_SANDBOXED)
109 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp 105 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp
110 ) 106 )
111 endif() 107 endif()
112 108
113 109
114 if (ENABLE_SDL AND ENABLE_QT) 110 if(ENABLE_SDL)
115 message("SDL and QT cannot not be enabled together")
116 elseif(ENABLE_SDL)
117 message("SDL is enabled") 111 message("SDL is enabled")
118 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) 112 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake)
119 add_definitions( 113 add_definitions(
120 -DORTHANC_ENABLE_QT=0
121 -DORTHANC_ENABLE_SDL=1 114 -DORTHANC_ENABLE_SDL=1
122 ) 115 )
123 elseif(ENABLE_QT)
124 add_definitions(
125 -DORTHANC_ENABLE_QT=1
126 -DORTHANC_ENABLE_SDL=0
127 )
128 if(DISABLE_STONE_QT_CMAKE_FILE)
129 message("QT is enabled, but QtConfiguration.cmake will not be included")
130 else()
131 message("QT is enabled")
132 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake)
133 endif()
134 else() 116 else()
135 message("SDL and QT are both disabled") 117 message("SDL is disabled")
136 unset(USE_SYSTEM_SDL CACHE) 118 unset(USE_SYSTEM_SDL CACHE)
137 add_definitions( 119 add_definitions(
138 -DORTHANC_ENABLE_SDL=0 120 -DORTHANC_ENABLE_SDL=0
139 -DORTHANC_ENABLE_QT=0
140 ) 121 )
141 endif() 122 endif()
142 123
143 124
144 if (ENABLE_THREADS) 125 if (ENABLE_THREADS)
265 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlWindow.cpp 246 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlWindow.cpp
266 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlWindow.h 247 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlWindow.h
267 ) 248 )
268 endif() 249 endif()
269 250
270 if (ENABLE_SDL OR ENABLE_QT) 251 if (ENABLE_SDL)
271 if (ENABLE_OPENGL) 252 if (ENABLE_OPENGL)
272 list(APPEND ORTHANC_STONE_SOURCES 253 list(APPEND ORTHANC_STONE_SOURCES
273 ${ORTHANC_STONE_ROOT}/Framework/OpenGL/SdlOpenGLContext.cpp 254 ${ORTHANC_STONE_ROOT}/Framework/OpenGL/SdlOpenGLContext.cpp
274 ${ORTHANC_STONE_ROOT}/Framework/OpenGL/SdlOpenGLContext.h 255 ${ORTHANC_STONE_ROOT}/Framework/OpenGL/SdlOpenGLContext.h
275 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlViewport.cpp 256 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlViewport.cpp
276 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlViewport.h 257 ${ORTHANC_STONE_ROOT}/Framework/Viewport/SdlViewport.h
277 ) 258 )
278 endif() 259 endif()
279 endif() 260 endif()
280 elseif (ENABLE_WASM)
281 set(STONE_WASM_SOURCES
282 ${ORTHANC_STONE_ROOT}/Platforms/Wasm/Defaults.cpp
283 ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmDelayedCallExecutor.cpp
284 ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmWebService.cpp
285 ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmViewport.cpp
286 ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmPlatformApplicationAdapter.cpp
287 ${AUTOGENERATED_DIR}/WasmWebService.c
288 ${AUTOGENERATED_DIR}/default-library.c
289 )
290
291 # Regenerate a dummy "WasmWebService.c" file each time the "WasmWebService.js" file
292 # is modified, so as to force a new execution of the linking
293 add_custom_command(
294 OUTPUT "${AUTOGENERATED_DIR}/WasmWebService.c"
295 COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/WasmWebService.c" ""
296 DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmWebService.js")
297 add_custom_command(
298 OUTPUT "${AUTOGENERATED_DIR}/WasmDelayedCallExecutor.c"
299 COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/WasmDelayedCallExecutor.c" ""
300 DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmDelayedCallExecutor.js")
301 add_custom_command(
302 OUTPUT "${AUTOGENERATED_DIR}/default-library.c"
303 COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/default-library.c" ""
304 DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/default-library.js")
305 endif()
306
307 if (ENABLE_STONE_DEPRECATED)
308 if (NOT ORTHANC_SANDBOXED)
309 list(APPEND PLATFORM_SOURCES
310 ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleWebService.cpp
311 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.cpp
312 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.h
313 )
314 endif()
315
316 if (ENABLE_SDL OR ENABLE_QT)
317 list(APPEND APPLICATIONS_SOURCES
318 ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationRunner.cpp
319 ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationContext.cpp
320 )
321 endif()
322
323 if (ENABLE_SDL)
324 list(APPEND APPLICATIONS_SOURCES
325 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlCairoSurface.cpp
326 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlEngine.cpp
327 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlOrthancSurface.cpp
328 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlStoneApplicationRunner.cpp
329 )
330 endif()
331
332 if (ENABLE_WASM)
333 list(APPEND APPLICATIONS_SOURCES
334 ${ORTHANC_STONE_ROOT}/Applications/Wasm/StartupParametersBuilder.cpp
335 )
336 endif()
337
338 if (ENABLE_THREADS)
339 list(APPEND ORTHANC_STONE_SOURCES
340 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Messages/LockingEmitter.cpp
341 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Messages/LockingEmitter.h
342 )
343 endif()
344
345 list(APPEND ORTHANC_STONE_SOURCES
346 ${ORTHANC_STONE_ROOT}/Applications/IStoneApplication.h
347 ${ORTHANC_STONE_ROOT}/Applications/StoneApplicationContext.cpp
348
349 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h
350 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.cpp
351 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.h
352 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.cpp
353 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.h
354 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.cpp
355 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.h
356 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp
357 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h
358 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.cpp
359 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.h
360 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.cpp
361 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.h
362 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.cpp
363 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.h
364 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ILayerRenderer.h
365 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/IVolumeSlicer.h
366 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.cpp
367 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.h
368 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.cpp
369 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.h
370 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.cpp
371 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.h
372 # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.cpp
373 # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.h
374 # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.cpp
375 # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.h
376 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.cpp
377 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.h
378 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader2.cpp
379 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader2.h
380 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.cpp
381 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.h
382 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp
383 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.h
384 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.cpp
385 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.h
386 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IDelayedCallExecutor.h
387 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ISeriesLoader.h
388 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.cpp
389 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.h
390 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.cpp
391 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.h
392 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.cpp
393 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.h
394 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp
395 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.h
396 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.cpp
397 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.h
398 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.cpp
399 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.h
400 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.cpp
401 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.h
402 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.cpp
403 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.h
404 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IMouseTracker.h
405 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IStatusBar.h
406 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IViewport.h
407 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.cpp
408 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.h
409 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/ISlicedVolume.h
410 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IVolumeLoader.h
411 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.cpp
412 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.h
413 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.cpp
414 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.h
415 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.cpp
416 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.h
417 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWidget.h
418 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneInteractor.h
419 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneMouseTracker.h
420 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.cpp
421 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.h
422 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.cpp
423 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.h
424 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.cpp
425 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.h
426 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.cpp
427 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.h
428 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.cpp
429 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.h
430 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.cpp
431 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.h
432 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.cpp
433 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.h
434 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.cpp
435 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.h
436 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.cpp
437 ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.h
438
439 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyAlphaLayer.cpp
440 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyDicomLayer.cpp
441 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayer.cpp
442 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerCropTracker.cpp
443 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMaskTracker.cpp
444 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMoveTracker.cpp
445 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerResizeTracker.cpp
446 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerRotateTracker.cpp
447 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyMaskLayer.cpp
448 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyScene.cpp
449 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneCommand.cpp
450 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneReader.cpp
451 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneWriter.cpp
452 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyTextLayer.cpp
453 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyWidget.cpp
454 ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyWindowingTracker.cpp
455 )
456 endif() 261 endif()
457 262
458 263
459 if (ENABLE_DCMTK) 264 if (ENABLE_DCMTK)
460 list(APPEND ORTHANC_STONE_SOURCES 265 list(APPEND ORTHANC_STONE_SOURCES