Mercurial > hg > orthanc-stone
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 |
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 | 20 cmake_minimum_required(VERSION 2.8.10) |
1592 | 21 cmake_policy(SET CMP0058 NEW) |
1464 | 22 |
23 project(OrthancStone) | |
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 | 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 | 41 endif() |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
42 |
1464 | 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 | 50 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") |
51 # This include must be after "OrthancStoneConfiguration.cmake" to | |
52 # have "BOOST_SOURCES_DIR" defined | |
53 include(${CMAKE_SOURCE_DIR}/BoostExtendedConfiguration.cmake) | |
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 | 57 DownloadPackage( |
58 "a24b8136b8f3bb93f166baf97d9328de" | |
59 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip" | |
60 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83") | |
61 | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1464
diff
changeset
|
62 EmbedResources( |
1586 | 63 COLORMAP_HOT ${CMAKE_SOURCE_DIR}/../../Resources/Colormaps/hot.lut |
1464 | 64 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf |
65 ) | |
66 | |
67 SortFilesInSourceGroups() | |
68 | |
69 add_library(OrthancStone STATIC | |
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 | 73 ) |
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 | 78 |
79 ############################# | |
80 project(RtViewerSdl) | |
81 | |
82 add_executable(RtViewerSdl | |
83 RtViewer/RtViewerSdl.cpp | |
84 SdlHelpers.h | |
85 ../Common/RtViewerApp.cpp | |
86 ../Common/RtViewerApp.h | |
87 ../Common/RtViewerView.cpp | |
88 ../Common/RtViewerView.h | |
89 ../Common/SampleHelpers.h | |
90 ) | |
91 | |
92 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES}) | |
93 | |
94 ############################# | |
95 project(SdlSimpleViewer) | |
96 | |
97 add_executable(SdlSimpleViewer | |
98 SdlHelpers.h | |
99 ../Common/SampleHelpers.h | |
100 SingleFrameViewer/SdlSimpleViewerApplication.h | |
101 SingleFrameViewer/SdlSimpleViewer.cpp | |
102 ) | |
103 | |
104 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES}) | |
105 | |
106 ############################# | |
107 project(UnitTests) | |
108 | |
109 add_executable(UnitTests | |
110 ${GOOGLE_TEST_SOURCES} | |
1587 | 111 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/GenericToolboxTests.cpp |
112 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/ImageToolboxTests.cpp | |
113 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/PixelTestPatternsTests.cpp | |
114 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestMessageBroker.cpp | |
115 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestStrategy.cpp | |
116 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/TestStructureSet.cpp | |
117 ${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/SortedFramesTests.cpp | |
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 | 120 |
121 target_link_libraries(UnitTests OrthancStone) | |
122 | |
123 add_custom_command( | |
124 TARGET UnitTests | |
125 POST_BUILD | |
126 COMMAND ${CMAKE_COMMAND} -E copy | |
1587 | 127 "${CMAKE_SOURCE_DIR}/../../../UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
1464 | 128 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
129 ) | |
130 | |
131 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES}) |