Mercurial > hg > orthanc-stone
annotate Applications/Samples/Sdl/CMakeLists.txt @ 1886:ca89fec8c48f
test
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Jan 2022 19:10:30 +0100 |
parents | a05529952510 |
children | 184b0aeae1af |
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 |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
6 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
7 # 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
|
8 # 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
|
9 # 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
|
10 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
11 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
12 # 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
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
15 # Affero General Public License for more details. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
16 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
17 # 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
|
18 # 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
|
19 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
20 |
1464 | 21 cmake_minimum_required(VERSION 2.8.10) |
1592 | 22 cmake_policy(SET CMP0058 NEW) |
1464 | 23 |
24 project(OrthancStone) | |
25 | |
1771
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1765
diff
changeset
|
26 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1765
diff
changeset
|
27 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") |
1591
5887a4f8594b
moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
28 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
|
29 |
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
30 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
|
31 set(ORTHANC_BOOST_COMPONENTS program_options) |
1464 | 32 |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
33 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
|
34 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
|
35 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
|
36 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
|
37 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake) |
1512
244ad1e4e76a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1511
diff
changeset
|
38 |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
39 else() |
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
40 set(ENABLE_GOOGLE_TEST ON) |
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
41 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
|
42 set(ENABLE_OPENGL ON) # <== |
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
43 set(ENABLE_WEB_CLIENT ON) |
1464 | 44 endif() |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
45 |
1464 | 46 set(ENABLE_DCMTK ON) # <== |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
47 set(ENABLE_SDL ON) |
1585
94edbfa64c97
enable pugixml in samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
48 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
|
49 |
1591
5887a4f8594b
moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
50 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
|
51 include(${CMAKE_SOURCE_DIR}/Utilities.cmake) |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
52 include(${CMAKE_SOURCE_DIR}/../../../OrthancStone/UnitTestsSources/UnitTestsSources.cmake) |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
53 |
1511 | 54 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") |
55 # This include must be after "OrthancStoneConfiguration.cmake" to | |
56 # have "BOOST_SOURCES_DIR" defined | |
57 include(${CMAKE_SOURCE_DIR}/BoostExtendedConfiguration.cmake) | |
58 endif() | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
59 |
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
60 |
1464 | 61 DownloadPackage( |
62 "a24b8136b8f3bb93f166baf97d9328de" | |
63 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip" | |
64 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83") | |
65 | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
66 EmbedResources( |
1586 | 67 COLORMAP_HOT ${CMAKE_SOURCE_DIR}/../../Resources/Colormaps/hot.lut |
1464 | 68 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf |
1881
a05529952510
fix build of unit tests in SDL project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
69 RT_STRUCT_00 ${CMAKE_SOURCE_DIR}/../../../OrthancStone/UnitTestsSources/TestStructureSet.json |
1464 | 70 ) |
71 | |
72 SortFilesInSourceGroups() | |
73 | |
74 add_library(OrthancStone STATIC | |
75 ${ORTHANC_STONE_SOURCES} | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
76 ${AUTOGENERATED_SOURCES} |
1473
9cbc6d21ae89
SeriesThumbnailsLoader::SuccessMessage::DecodeImage(), fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1471
diff
changeset
|
77 ${BOOST_EXTENDED_SOURCES} |
1464 | 78 ) |
79 | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
80 message(${AUTOGENERATED_SOURCES}) |
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
81 |
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
82 |
1464 | 83 |
84 ############################# | |
85 project(RtViewerSdl) | |
86 | |
87 add_executable(RtViewerSdl | |
88 RtViewer/RtViewerSdl.cpp | |
89 SdlHelpers.h | |
90 ../Common/RtViewerApp.cpp | |
91 ../Common/RtViewerApp.h | |
92 ../Common/RtViewerView.cpp | |
93 ../Common/RtViewerView.h | |
94 ../Common/SampleHelpers.h | |
95 ) | |
96 | |
97 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES}) | |
98 | |
99 ############################# | |
100 project(SdlSimpleViewer) | |
101 | |
102 add_executable(SdlSimpleViewer | |
103 SdlHelpers.h | |
104 ../Common/SampleHelpers.h | |
105 SingleFrameViewer/SdlSimpleViewerApplication.h | |
106 SingleFrameViewer/SdlSimpleViewer.cpp | |
107 ) | |
108 | |
109 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES}) | |
110 | |
111 ############################# | |
112 project(UnitTests) | |
113 | |
114 add_executable(UnitTests | |
115 ${GOOGLE_TEST_SOURCES} | |
1771
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1765
diff
changeset
|
116 ${UNIT_TESTS_SOURCES} |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
117 ) |
1464 | 118 |
119 target_link_libraries(UnitTests OrthancStone) | |
120 | |
121 add_custom_command( | |
122 TARGET UnitTests | |
123 POST_BUILD | |
124 COMMAND ${CMAKE_COMMAND} -E copy | |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
125 "${CMAKE_SOURCE_DIR}/../../../OrthancStone/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
1464 | 126 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
127 ) | |
128 | |
129 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES}) |