Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 19:00:30 2020 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 20:41:36 2020 +0200 @@ -47,18 +47,14 @@ message(FATAL_ERROR "Cannot enable SDL in sandboxed environments") endif() - if (ENABLE_QT) - message(FATAL_ERROR "Cannot enable QT in sandboxed environments") - endif() - if (ENABLE_SSL) message(FATAL_ERROR "Cannot enable SSL in sandboxed environments") endif() endif() if (ENABLE_OPENGL) - if (NOT ENABLE_QT AND NOT ENABLE_SDL AND NOT ENABLE_WASM) - message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly, SDL and Qt are all disabled") + if (NOT ENABLE_SDL AND NOT ENABLE_WASM) + message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly and SDL are both disabled") endif() endif() @@ -111,32 +107,17 @@ endif() -if (ENABLE_SDL AND ENABLE_QT) - message("SDL and QT cannot not be enabled together") -elseif(ENABLE_SDL) +if(ENABLE_SDL) message("SDL is enabled") include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) add_definitions( - -DORTHANC_ENABLE_QT=0 -DORTHANC_ENABLE_SDL=1 ) -elseif(ENABLE_QT) - add_definitions( - -DORTHANC_ENABLE_QT=1 - -DORTHANC_ENABLE_SDL=0 - ) - if(DISABLE_STONE_QT_CMAKE_FILE) - message("QT is enabled, but QtConfiguration.cmake will not be included") - else() - message("QT is enabled") - include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake) - endif() else() - message("SDL and QT are both disabled") + message("SDL is disabled") unset(USE_SYSTEM_SDL CACHE) add_definitions( -DORTHANC_ENABLE_SDL=0 - -DORTHANC_ENABLE_QT=0 ) endif() @@ -267,7 +248,7 @@ ) endif() - if (ENABLE_SDL OR ENABLE_QT) + if (ENABLE_SDL) if (ENABLE_OPENGL) list(APPEND ORTHANC_STONE_SOURCES ${ORTHANC_STONE_ROOT}/Framework/OpenGL/SdlOpenGLContext.cpp @@ -277,182 +258,6 @@ ) endif() endif() -elseif (ENABLE_WASM) - set(STONE_WASM_SOURCES - ${ORTHANC_STONE_ROOT}/Platforms/Wasm/Defaults.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmDelayedCallExecutor.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmWebService.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmViewport.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmPlatformApplicationAdapter.cpp - ${AUTOGENERATED_DIR}/WasmWebService.c - ${AUTOGENERATED_DIR}/default-library.c - ) - - # Regenerate a dummy "WasmWebService.c" file each time the "WasmWebService.js" file - # is modified, so as to force a new execution of the linking - add_custom_command( - OUTPUT "${AUTOGENERATED_DIR}/WasmWebService.c" - COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/WasmWebService.c" "" - DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmWebService.js") - add_custom_command( - OUTPUT "${AUTOGENERATED_DIR}/WasmDelayedCallExecutor.c" - COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/WasmDelayedCallExecutor.c" "" - DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/WasmDelayedCallExecutor.js") - add_custom_command( - OUTPUT "${AUTOGENERATED_DIR}/default-library.c" - COMMAND ${CMAKE_COMMAND} -E touch "${AUTOGENERATED_DIR}/default-library.c" "" - DEPENDS "${ORTHANC_STONE_ROOT}/Platforms/Wasm/default-library.js") -endif() - -if (ENABLE_STONE_DEPRECATED) - if (NOT ORTHANC_SANDBOXED) - list(APPEND PLATFORM_SOURCES - ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleWebService.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.h - ) - endif() - - if (ENABLE_SDL OR ENABLE_QT) - list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationRunner.cpp - ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationContext.cpp - ) - endif() - - if (ENABLE_SDL) - list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlCairoSurface.cpp - ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlEngine.cpp - ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlOrthancSurface.cpp - ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlStoneApplicationRunner.cpp - ) - endif() - - if (ENABLE_WASM) - list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Wasm/StartupParametersBuilder.cpp - ) - endif() - - if (ENABLE_THREADS) - list(APPEND ORTHANC_STONE_SOURCES - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Messages/LockingEmitter.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Messages/LockingEmitter.h - ) - endif() - - list(APPEND ORTHANC_STONE_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/IStoneApplication.h - ${ORTHANC_STONE_ROOT}/Applications/StoneApplicationContext.cpp - - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ILayerRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/IVolumeSlicer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.h - # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.cpp - # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.h - # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.cpp - # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader2.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader2.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IDelayedCallExecutor.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ISeriesLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IMouseTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IStatusBar.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IViewport.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/ISlicedVolume.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IVolumeLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneInteractor.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneMouseTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.h - - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyAlphaLayer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyDicomLayer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerCropTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMaskTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerMoveTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerResizeTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayerRotateTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyMaskLayer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyScene.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneCommand.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneReader.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographySceneWriter.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyTextLayer.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyWidget.cpp - ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyWindowingTracker.cpp - ) endif()