Mercurial > hg > orthanc-stone
annotate Samples/Sdl/CMakeLists.txt @ 1449:11141df26e0d loader-injection-feature
Warning fix
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 02 Jun 2020 16:43:21 +0200 |
parents | 1e132fe7090e |
children | 15173a383a00 |
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) |
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 | 33 list(APPEND ORTHANC_BOOST_COMPONENTS program_options) |
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 include_directories(${STONE_ROOT}) |
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 include_directories(../Common) |
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 |
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 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
|
42 -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
|
43 -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
|
44 -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
|
45 -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
|
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 |
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 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
|
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 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
|
51 ${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
|
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 |
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 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
|
57 |
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 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
|
59 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
|
60 SdlHelpers.h |
1422 | 61 ../Common/RtViewerApp.cpp |
62 ../Common/RtViewerApp.h | |
63 ../Common/RtViewerView.cpp | |
64 ../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
|
65 ../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
|
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 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
68 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
|
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 ############################# |
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 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
|
72 |
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 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
|
74 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
|
75 ../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
|
76 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
|
77 SingleFrameViewer/SdlSimpleViewer.cpp |
1424
b424028392cf
fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
78 ${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
|
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 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
81 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
|
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 ############################# |
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 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
|
85 |
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 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
|
87 ${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
|
88 ${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
|
89 ${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
|
90 ${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
|
91 ${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
|
92 ${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
|
93 ${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
|
94 ${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
|
95 ${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
|
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 |
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_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
|
99 |
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 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
|
101 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
|
102 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
|
103 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
|
104 "${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
|
105 "$<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
|
106 ) |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
107 |
1426
1e132fe7090e
fix dynamic linking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1425
diff
changeset
|
108 target_link_libraries(UnitTests OrthancStone ${DCMTK_LIBRARIES}) |