Mercurial > hg > orthanc-stone
annotate Samples/Sdl/CMakeLists.txt @ 1422:9e7015edd107
fix projects
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 13 May 2020 14:58:58 +0200 |
parents | f5493e5a51a3 |
children | 6c3f260c4de7 |
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 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
5 set(ORTHANC_FRAMEWORK_SOURCE "path") |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
diff
changeset
|
6 set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../orthanc) |
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 |
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 include(${STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.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
|
34 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
|
35 |
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_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
|
37 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
|
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 |
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 target_link_libraries(RtViewerSdl ${DCMTK_LIBRARIES} 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
|
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 |
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 |
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 target_link_libraries(SdlSimpleViewer ${DCMTK_LIBRARIES} 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
|
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 |
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_link_libraries(UnitTests ${DCMTK_LIBRARIES} OrthancStone) |