Mercurial > hg > orthanc-stone
annotate Samples/Sdl/CMakeLists.txt @ 1462:b17d03599726
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jun 2020 07:18:07 +0200 |
parents | 15173a383a00 |
children | 4647636334aa |
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 | 5 set(ORTHANC_FRAMEWORK_SOURCE "path" CACHE STRING "select the source of Orthanc") |
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) |
1462 | 13 set(STANDALONE_BUILD ON) # To have DCMTK_USE_EMBEDDED_DICTIONARIES defined |
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
|
14 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
|
15 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
|
16 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
|
17 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
|
18 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
|
19 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
|
20 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
|
21 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
|
22 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
|
23 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
|
24 |
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 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
|
26 "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
|
27 "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
|
28 "${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
|
29 |
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 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
|
31 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
|
32 ) |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
33 |
1425 | 34 list(APPEND ORTHANC_BOOST_COMPONENTS program_options) |
35 include(${STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake) | |
1424
b424028392cf
fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
36 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
|
37 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
|
38 |
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 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
|
40 -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
|
41 -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
|
42 -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
|
43 -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
|
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 |
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 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
|
47 |
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 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
|
49 ${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
|
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 ############################# |
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 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
|
55 |
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 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
|
57 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
|
58 SdlHelpers.h |
1422 | 59 ../Common/RtViewerApp.cpp |
60 ../Common/RtViewerApp.h | |
61 ../Common/RtViewerView.cpp | |
62 ../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
|
63 ../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
|
64 ) |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
65 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
66 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
|
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 ############################# |
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 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
|
70 |
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 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
|
72 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
|
73 ../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
|
74 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
|
75 SingleFrameViewer/SdlSimpleViewer.cpp |
1424
b424028392cf
fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
76 ${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
|
77 ) |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
78 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
79 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
|
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 ############################# |
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 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
|
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
|
84 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
|
85 ${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
|
86 ${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
|
87 ${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
|
88 ${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
|
89 ${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
|
90 ${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
|
91 ${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
|
92 ${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
|
93 ${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
|
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 |
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 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
|
97 |
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 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
|
99 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
|
100 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
|
101 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
|
102 "${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
|
103 "$<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
|
104 ) |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
105 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
106 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES}) |