annotate Applications/Samples/Sdl/CMakeLists.txt @ 1599:73cd85d7da6a

SortedFrames::LookupSopInstanceUid()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Oct 2020 10:55:45 +0100
parents 621e4e11783d
children 9ac2a65d4172
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
1 # Stone of Orthanc
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
3 # Department, University Hospital of Liege, Belgium
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
5 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
6 # This program is free software: you can redistribute it and/or
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
7 # modify it under the terms of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
9 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
10 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
11 # This program is distributed in the hope that it will be useful, but
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
14 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
15 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
16 # You should have received a copy of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
18
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
19
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
20 cmake_minimum_required(VERSION 2.8.10)
1592
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1591
diff changeset
21 cmake_policy(SET CMP0058 NEW)
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
22
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
23 project(OrthancStone)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
24
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
25 include(${CMAKE_SOURCE_DIR}/../../Platforms/Sdl/OrthancStoneSdlParameters.cmake)
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
26
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
27 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
28 set(ORTHANC_BOOST_COMPONENTS program_options)
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
29
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
30 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
31 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
32 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
1595
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1592
diff changeset
33 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/DownloadPackage.cmake)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1592
diff changeset
34 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
1512
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1511
diff changeset
35
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
36 else()
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
37 set(ENABLE_GOOGLE_TEST ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
38 set(ENABLE_LOCALE ON) # Necessary for text rendering
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
39 set(ENABLE_OPENGL ON) # <==
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
40 set(ENABLE_WEB_CLIENT ON)
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
41 endif()
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
42
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
43 set(ENABLE_DCMTK ON) # <==
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
44 set(ENABLE_SDL ON)
1585
94edbfa64c97 enable pugixml in samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
45 SET(ENABLE_PUGIXML ON) # To test compilation of OsiriX annotations
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
46
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
47 include(${CMAKE_SOURCE_DIR}/../../Platforms/Sdl/OrthancStoneSdlConfiguration.cmake)
1473
9cbc6d21ae89 SeriesThumbnailsLoader::SuccessMessage::DecodeImage(), fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
48 include(${CMAKE_SOURCE_DIR}/Utilities.cmake)
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
49
1511
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
50 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
51 # This include must be after "OrthancStoneConfiguration.cmake" to
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
52 # have "BOOST_SOURCES_DIR" defined
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
53 include(${CMAKE_SOURCE_DIR}/BoostExtendedConfiguration.cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
54 endif()
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
55
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
56
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
57 DownloadPackage(
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
58 "a24b8136b8f3bb93f166baf97d9328de"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
59 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
60 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
61
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
62 EmbedResources(
1586
b5417e377636 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
63 COLORMAP_HOT ${CMAKE_SOURCE_DIR}/../../Resources/Colormaps/hot.lut
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
64 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
65 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
66
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
67 SortFilesInSourceGroups()
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
68
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
69 add_library(OrthancStone STATIC
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
70 ${ORTHANC_STONE_SOURCES}
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
71 ${AUTOGENERATED_SOURCES}
1473
9cbc6d21ae89 SeriesThumbnailsLoader::SuccessMessage::DecodeImage(), fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
72 ${BOOST_EXTENDED_SOURCES}
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
73 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
74
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
75 message(${AUTOGENERATED_SOURCES})
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
76
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
77
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
78
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
79 #############################
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
80 project(RtViewerSdl)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
81
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
82 add_executable(RtViewerSdl
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
83 RtViewer/RtViewerSdl.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
84 SdlHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
85 ../Common/RtViewerApp.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
86 ../Common/RtViewerApp.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
87 ../Common/RtViewerView.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
88 ../Common/RtViewerView.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
89 ../Common/SampleHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
90 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
91
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
92 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
93
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
94 #############################
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
95 project(SdlSimpleViewer)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
96
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
97 add_executable(SdlSimpleViewer
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
98 SdlHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
99 ../Common/SampleHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
100 SingleFrameViewer/SdlSimpleViewerApplication.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
101 SingleFrameViewer/SdlSimpleViewer.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
102 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
103
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
104 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
105
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
106 #############################
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
107 project(UnitTests)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
108
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
109 add_executable(UnitTests
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
110 ${GOOGLE_TEST_SOURCES}
1587
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
111 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/GenericToolboxTests.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
112 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/ImageToolboxTests.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
113 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/PixelTestPatternsTests.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
114 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestMessageBroker.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
115 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestStrategy.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
116 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestStructureSet.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
117 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/SortedFramesTests.cpp
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
118 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/UnitTestsMain.cpp
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
119 )
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
120
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
121 target_link_libraries(UnitTests OrthancStone)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
122
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
123 add_custom_command(
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
124 TARGET UnitTests
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
125 POST_BUILD
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
126 COMMAND ${CMAKE_COMMAND} -E copy
1587
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1586
diff changeset
127 "${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
128 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
129 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
130
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
131 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES})