1464
|
1 cmake_minimum_required(VERSION 2.8.10)
|
|
2
|
|
3 project(OrthancStone)
|
|
4
|
|
5 set(ORTHANC_FRAMEWORK_SOURCE "path" CACHE STRING "select the source of Orthanc")
|
|
6 set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../orthanc CACHE STRING "select the root path of Orthanc")
|
|
7 set(STONE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../)
|
|
8
|
|
9 include(${STONE_ROOT}/Resources/CMake/OrthancStoneParameters.cmake)
|
|
10 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
|
|
11
|
|
12 set(ALLOW_DOWNLOADS ON)
|
|
13 set(STANDALONE_BUILD ON) # To have DCMTK_USE_EMBEDDED_DICTIONARIES defined
|
|
14 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
15 set(STATIC_BUILD ON)
|
|
16 endif()
|
|
17 set(ENABLE_GOOGLE_TEST ON)
|
|
18 set(ENABLE_LOCALE ON) # Necessary for text rendering
|
|
19 set(ENABLE_SDL ON)
|
|
20 set(ENABLE_DCMTK ON) # <==
|
|
21 set(ENABLE_OPENGL ON) # <==
|
|
22 set(ENABLE_WEB_CLIENT ON)
|
|
23 set(ORTHANC_SANDBOXED OFF)
|
|
24
|
|
25 DownloadPackage(
|
|
26 "a24b8136b8f3bb93f166baf97d9328de"
|
|
27 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
|
|
28 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
|
|
29
|
|
30 set(ORTHANC_STONE_APPLICATION_RESOURCES
|
|
31 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
|
|
32 )
|
|
33
|
|
34 list(APPEND ORTHANC_BOOST_COMPONENTS program_options)
|
|
35 include(${STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)
|
|
36 include(${STONE_ROOT}/Resources/CMake/BoostExtendedConfiguration.cmake)
|
|
37 include(${STONE_ROOT}/Resources/CMake/Utilities.cmake)
|
|
38
|
|
39 add_definitions(
|
|
40 -DORTHANC_ENABLE_LOGGING=1
|
|
41 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
|
|
42 -DORTHANC_ENABLE_PUGIXML=0
|
|
43 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1
|
|
44 )
|
|
45
|
|
46 SortFilesInSourceGroups()
|
|
47
|
|
48 add_library(OrthancStone STATIC
|
|
49 ${ORTHANC_STONE_SOURCES}
|
|
50 )
|
|
51
|
|
52
|
|
53 #############################
|
|
54 project(RtViewerSdl)
|
|
55
|
|
56 add_executable(RtViewerSdl
|
|
57 RtViewer/RtViewerSdl.cpp
|
|
58 SdlHelpers.h
|
|
59 ../Common/RtViewerApp.cpp
|
|
60 ../Common/RtViewerApp.h
|
|
61 ../Common/RtViewerView.cpp
|
|
62 ../Common/RtViewerView.h
|
|
63 ../Common/SampleHelpers.h
|
|
64 )
|
|
65
|
|
66 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
|
|
67
|
|
68 #############################
|
|
69 project(SdlSimpleViewer)
|
|
70
|
|
71 add_executable(SdlSimpleViewer
|
|
72 SdlHelpers.h
|
|
73 ../Common/SampleHelpers.h
|
|
74 SingleFrameViewer/SdlSimpleViewerApplication.h
|
|
75 SingleFrameViewer/SdlSimpleViewer.cpp
|
|
76 ${BOOST_EXTENDED_SOURCES}
|
|
77 )
|
|
78
|
|
79 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
|
|
80
|
|
81 #############################
|
|
82 project(UnitTests)
|
|
83
|
|
84 add_executable(UnitTests
|
|
85 ${GOOGLE_TEST_SOURCES}
|
|
86 ${ORTHANC_STONE_ROOT}/UnitTestsSources/GenericToolboxTests.cpp
|
|
87 ${ORTHANC_STONE_ROOT}/UnitTestsSources/ImageToolboxTests.cpp
|
|
88 ${ORTHANC_STONE_ROOT}/UnitTestsSources/PixelTestPatternsTests.cpp
|
|
89 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestCommands.cpp
|
|
90 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp
|
|
91 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStrategy.cpp
|
|
92 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStructureSet.cpp
|
|
93 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp
|
|
94 )
|
|
95
|
|
96 target_link_libraries(UnitTests OrthancStone)
|
|
97
|
|
98 add_custom_command(
|
|
99 TARGET UnitTests
|
|
100 POST_BUILD
|
|
101 COMMAND ${CMAKE_COMMAND} -E copy
|
|
102 "${ORTHANC_STONE_ROOT}/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
|
|
103 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
|
|
104 )
|
|
105
|
|
106 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES})
|