Mercurial > hg > orthanc-stone
comparison Applications/Samples/Sdl/CMakeLists.txt @ 1538:d1806b4e4839
moving OrthancStone/Samples/ as Applications/Samples/
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2020 13:24:38 +0200 |
parents | OrthancStone/Samples/Sdl/CMakeLists.txt@244ad1e4e76a |
children | 6e0da8370270 |
comparison
equal
deleted
inserted
replaced
1537:de8cf5859e84 | 1538:d1806b4e4839 |
---|---|
1 cmake_minimum_required(VERSION 2.8.10) | |
2 | |
3 project(OrthancStone) | |
4 | |
5 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneParameters.cmake) | |
6 | |
7 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") | |
8 set(ORTHANC_BOOST_COMPONENTS program_options) | |
9 | |
10 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") | |
11 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") | |
12 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE) | |
13 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/DownloadPackage.cmake) | |
14 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake) | |
15 | |
16 else() | |
17 set(ENABLE_GOOGLE_TEST ON) | |
18 set(ENABLE_LOCALE ON) # Necessary for text rendering | |
19 set(ENABLE_OPENGL ON) # <== | |
20 set(ENABLE_WEB_CLIENT ON) | |
21 endif() | |
22 | |
23 set(ENABLE_DCMTK ON) # <== | |
24 set(ENABLE_SDL ON) | |
25 | |
26 include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake) | |
27 include(${CMAKE_SOURCE_DIR}/Utilities.cmake) | |
28 | |
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() | |
34 | |
35 | |
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 | |
41 EmbedResources( | |
42 COLORMAP_HOT ${ORTHANC_STONE_ROOT}/Resources/Colormaps/hot.lut | |
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} | |
50 ${AUTOGENERATED_SOURCES} | |
51 ${BOOST_EXTENDED_SOURCES} | |
52 ) | |
53 | |
54 message(${AUTOGENERATED_SOURCES}) | |
55 | |
56 | |
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 | |
97 ${ORTHANC_STONE_ROOT}/UnitTestsSources/SortedFramesTests.cpp | |
98 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp | |
99 ) | |
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}) |