annotate Applications/Samples/Sdl/CMakeLists.txt @ 1543:4cfdaf4ef3fe

fixing paths
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2020 14:08:51 +0200
parents 6e0da8370270
children e04c8fec263e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
1 cmake_minimum_required(VERSION 2.8.10)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
2
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
3 project(OrthancStone)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
4
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
5 include(${CMAKE_SOURCE_DIR}/../../../OrthancStone/Resources/CMake/OrthancStoneParameters.cmake)
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
6
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
7 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
8 set(ORTHANC_BOOST_COMPONENTS program_options)
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
9
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
10 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
11 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
12 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
1512
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1511
diff changeset
13 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/DownloadPackage.cmake)
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1511
diff changeset
14 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1511
diff changeset
15
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
16 else()
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
17 set(ENABLE_GOOGLE_TEST ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
18 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
19 set(ENABLE_OPENGL ON) # <==
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
20 set(ENABLE_WEB_CLIENT ON)
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
21 endif()
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
22
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
23 set(ENABLE_DCMTK ON) # <==
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
24 set(ENABLE_SDL ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
25
1512
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1511
diff changeset
26 include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)
1473
9cbc6d21ae89 SeriesThumbnailsLoader::SuccessMessage::DecodeImage(), fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
27 include(${CMAKE_SOURCE_DIR}/Utilities.cmake)
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
28
1511
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
29 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
30 # This include must be after "OrthancStoneConfiguration.cmake" to
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
31 # have "BOOST_SOURCES_DIR" defined
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
32 include(${CMAKE_SOURCE_DIR}/BoostExtendedConfiguration.cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
33 endif()
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
34
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
35
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
36 DownloadPackage(
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
37 "a24b8136b8f3bb93f166baf97d9328de"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
38 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
39 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
40
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
41 EmbedResources(
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
42 COLORMAP_HOT ${ORTHANC_STONE_ROOT}/Resources/Colormaps/hot.lut
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
43 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
44 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
45
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
46 SortFilesInSourceGroups()
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
47
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
48 add_library(OrthancStone STATIC
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
49 ${ORTHANC_STONE_SOURCES}
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
50 ${AUTOGENERATED_SOURCES}
1473
9cbc6d21ae89 SeriesThumbnailsLoader::SuccessMessage::DecodeImage(), fix static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
51 ${BOOST_EXTENDED_SOURCES}
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
52 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
53
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1464
diff changeset
54 message(${AUTOGENERATED_SOURCES})
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
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
58 #############################
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
59 project(RtViewerSdl)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
60
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
61 add_executable(RtViewerSdl
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
62 RtViewer/RtViewerSdl.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
63 SdlHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
64 ../Common/RtViewerApp.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
65 ../Common/RtViewerApp.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
66 ../Common/RtViewerView.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
67 ../Common/RtViewerView.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
68 ../Common/SampleHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
69 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
70
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
71 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
72
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 project(SdlSimpleViewer)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
75
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
76 add_executable(SdlSimpleViewer
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
77 SdlHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
78 ../Common/SampleHelpers.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
79 SingleFrameViewer/SdlSimpleViewerApplication.h
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
80 SingleFrameViewer/SdlSimpleViewer.cpp
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
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
83 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
84
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
85 #############################
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
86 project(UnitTests)
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
87
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
88 add_executable(UnitTests
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
89 ${GOOGLE_TEST_SOURCES}
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
90 ${ORTHANC_STONE_ROOT}/UnitTestsSources/GenericToolboxTests.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
91 ${ORTHANC_STONE_ROOT}/UnitTestsSources/ImageToolboxTests.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
92 ${ORTHANC_STONE_ROOT}/UnitTestsSources/PixelTestPatternsTests.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
93 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestCommands.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
94 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
95 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStrategy.cpp
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
96 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStructureSet.cpp
1477
5732edec7cbd sorting frames in 3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1475
diff changeset
97 ${ORTHANC_STONE_ROOT}/UnitTestsSources/SortedFramesTests.cpp
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
98 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1504
diff changeset
99 )
1464
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
100
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
101 target_link_libraries(UnitTests OrthancStone)
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 add_custom_command(
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
104 TARGET UnitTests
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
105 POST_BUILD
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
106 COMMAND ${CMAKE_COMMAND} -E copy
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
107 "${ORTHANC_STONE_ROOT}/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
108 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
109 )
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
110
4647636334aa dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1462
diff changeset
111 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES})