annotate Samples/Sdl/CMakeLists.txt @ 1457:15173a383a00

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 21:12:02 +0200
parents 1e132fe7090e
children b17d03599726
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8.10)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 project(OrthancStone)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4
1423
6c3f260c4de7 tentative to fix CI build
Alain Mazy <alain@mazy.be>
parents: 1422
diff changeset
5 set(ORTHANC_FRAMEWORK_SOURCE "path" CACHE STRING "select the source of Orthanc")
6c3f260c4de7 tentative to fix CI build
Alain Mazy <alain@mazy.be>
parents: 1422
diff changeset
6 set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../orthanc CACHE STRING "select the root path of Orthanc")
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7 set(STONE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9 include(${STONE_ROOT}/Resources/CMake/OrthancStoneParameters.cmake)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
12 set(ALLOW_DOWNLOADS ON)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
13 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
14 set(STATIC_BUILD ON)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
15 endif()
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
16 set(ENABLE_GOOGLE_TEST ON)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
17 set(ENABLE_LOCALE ON) # Necessary for text rendering
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
18 set(ENABLE_SDL ON)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
19 set(ENABLE_DCMTK ON) # <==
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
20 set(ENABLE_OPENGL ON) # <==
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
21 set(ENABLE_WEB_CLIENT ON)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
22 set(ORTHANC_SANDBOXED OFF)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
23
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
24 DownloadPackage(
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
25 "a24b8136b8f3bb93f166baf97d9328de"
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
27 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29 set(ORTHANC_STONE_APPLICATION_RESOURCES
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
30 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32
1425
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1424
diff changeset
33 list(APPEND ORTHANC_BOOST_COMPONENTS program_options)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1424
diff changeset
34 include(${STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)
1424
b424028392cf fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1423
diff changeset
35 include(${STONE_ROOT}/Resources/CMake/BoostExtendedConfiguration.cmake)
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
36 include(${STONE_ROOT}/Resources/CMake/Utilities.cmake)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38 add_definitions(
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 -DORTHANC_ENABLE_LOGGING=1
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41 -DORTHANC_ENABLE_PUGIXML=0
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
43 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
44
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
45 SortFilesInSourceGroups()
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
47 add_library(OrthancStone STATIC
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
48 ${ORTHANC_STONE_SOURCES}
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
49 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
50
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
51
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
52 #############################
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
53 project(RtViewerSdl)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
54
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
55 add_executable(RtViewerSdl
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
56 RtViewer/RtViewerSdl.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
57 SdlHelpers.h
1422
9e7015edd107 fix projects
Alain Mazy <alain@mazy.be>
parents: 1419
diff changeset
58 ../Common/RtViewerApp.cpp
9e7015edd107 fix projects
Alain Mazy <alain@mazy.be>
parents: 1419
diff changeset
59 ../Common/RtViewerApp.h
9e7015edd107 fix projects
Alain Mazy <alain@mazy.be>
parents: 1419
diff changeset
60 ../Common/RtViewerView.cpp
9e7015edd107 fix projects
Alain Mazy <alain@mazy.be>
parents: 1419
diff changeset
61 ../Common/RtViewerView.h
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
62 ../Common/SampleHelpers.h
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
63 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
64
1426
1e132fe7090e fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1425
diff changeset
65 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
66
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
67 #############################
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
68 project(SdlSimpleViewer)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
69
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
70 add_executable(SdlSimpleViewer
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
71 SdlHelpers.h
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
72 ../Common/SampleHelpers.h
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
73 SingleFrameViewer/SdlSimpleViewerApplication.h
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
74 SingleFrameViewer/SdlSimpleViewer.cpp
1424
b424028392cf fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1423
diff changeset
75 ${BOOST_EXTENDED_SOURCES}
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
77
1426
1e132fe7090e fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1425
diff changeset
78 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
1419
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
79
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
80 #############################
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
81 project(UnitTests)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
82
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
83 add_executable(UnitTests
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
84 ${GOOGLE_TEST_SOURCES}
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
85 ${ORTHANC_STONE_ROOT}/UnitTestsSources/GenericToolboxTests.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
86 ${ORTHANC_STONE_ROOT}/UnitTestsSources/ImageToolboxTests.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
87 ${ORTHANC_STONE_ROOT}/UnitTestsSources/PixelTestPatternsTests.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
88 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestCommands.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
89 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
90 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStrategy.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
91 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStructureSet.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
92 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
93 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
94
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
95 target_link_libraries(UnitTests OrthancStone)
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
96
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
97 add_custom_command(
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
98 TARGET UnitTests
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
99 POST_BUILD
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
100 COMMAND ${CMAKE_COMMAND} -E copy
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
101 "${ORTHANC_STONE_ROOT}/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
102 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
103 )
f5493e5a51a3 single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff changeset
104
1426
1e132fe7090e fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1425
diff changeset
105 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES})