Mercurial > hg > orthanc-stone
annotate Samples/Sdl/CMakeLists.txt @ 1424:b424028392cf
fixing some build errors
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 May 2020 11:41:33 +0200 |
parents | 6c3f260c4de7 |
children | 95674f9c169a |
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 |
1424
b424028392cf
fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
33 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
|
34 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
|
35 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
|
36 |
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(${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
|
38 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
|
39 |
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 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
|
41 -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
|
42 -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
|
43 -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
|
44 -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
|
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 |
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 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
|
48 |
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 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
|
50 ${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
|
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 ############################# |
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 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
|
56 |
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 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
|
58 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
|
59 SdlHelpers.h |
1422 | 60 ../Common/RtViewerApp.cpp |
61 ../Common/RtViewerApp.h | |
62 ../Common/RtViewerView.cpp | |
63 ../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
|
64 ../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
|
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 |
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 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
|
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 ############################# |
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 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
|
71 |
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 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
|
73 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
|
74 ../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
|
75 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
|
76 SingleFrameViewer/SdlSimpleViewer.cpp |
1424
b424028392cf
fixing some build errors
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
77 ${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
|
78 ) |
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 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
|
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 ############################# |
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 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
|
84 |
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 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
|
86 ${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
|
87 ${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
|
88 ${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
|
89 ${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
|
90 ${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
|
91 ${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
|
92 ${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
|
93 ${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
|
94 ${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
|
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 |
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 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
|
98 |
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 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
|
100 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
|
101 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
|
102 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
|
103 "${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
|
104 "$<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
|
105 ) |
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 target_link_libraries(UnitTests ${DCMTK_LIBRARIES} OrthancStone) |