Mercurial > hg > orthanc-stone
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 |
rev | line source |
---|---|
1464 | 1 cmake_minimum_required(VERSION 2.8.10) |
2 | |
3 project(OrthancStone) | |
4 | |
1542 | 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 | 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 | 21 endif() |
1509
b7210c688ca7
linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
22 |
1464 | 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 | 29 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") |
30 # This include must be after "OrthancStoneConfiguration.cmake" to | |
31 # have "BOOST_SOURCES_DIR" defined | |
32 include(${CMAKE_SOURCE_DIR}/BoostExtendedConfiguration.cmake) | |
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 | 36 DownloadPackage( |
37 "a24b8136b8f3bb93f166baf97d9328de" | |
38 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip" | |
39 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83") | |
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 | 43 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf |
44 ) | |
45 | |
46 SortFilesInSourceGroups() | |
47 | |
48 add_library(OrthancStone STATIC | |
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 | 52 ) |
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 | 57 |
58 ############################# | |
59 project(RtViewerSdl) | |
60 | |
61 add_executable(RtViewerSdl | |
62 RtViewer/RtViewerSdl.cpp | |
63 SdlHelpers.h | |
64 ../Common/RtViewerApp.cpp | |
65 ../Common/RtViewerApp.h | |
66 ../Common/RtViewerView.cpp | |
67 ../Common/RtViewerView.h | |
68 ../Common/SampleHelpers.h | |
69 ) | |
70 | |
71 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES}) | |
72 | |
73 ############################# | |
74 project(SdlSimpleViewer) | |
75 | |
76 add_executable(SdlSimpleViewer | |
77 SdlHelpers.h | |
78 ../Common/SampleHelpers.h | |
79 SingleFrameViewer/SdlSimpleViewerApplication.h | |
80 SingleFrameViewer/SdlSimpleViewer.cpp | |
81 ) | |
82 | |
83 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES}) | |
84 | |
85 ############################# | |
86 project(UnitTests) | |
87 | |
88 add_executable(UnitTests | |
89 ${GOOGLE_TEST_SOURCES} | |
90 ${ORTHANC_STONE_ROOT}/UnitTestsSources/GenericToolboxTests.cpp | |
91 ${ORTHANC_STONE_ROOT}/UnitTestsSources/ImageToolboxTests.cpp | |
92 ${ORTHANC_STONE_ROOT}/UnitTestsSources/PixelTestPatternsTests.cpp | |
93 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestCommands.cpp | |
94 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp | |
95 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStrategy.cpp | |
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 | 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 | 100 |
101 target_link_libraries(UnitTests OrthancStone) | |
102 | |
103 add_custom_command( | |
104 TARGET UnitTests | |
105 POST_BUILD | |
106 COMMAND ${CMAKE_COMMAND} -E copy | |
107 "${ORTHANC_STONE_ROOT}/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" | |
108 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" | |
109 ) | |
110 | |
111 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES}) |