Mercurial > hg > orthanc-stone
annotate Platforms/Generic/CMakeLists.txt @ 277:a38465cc909f am-2
Qt: refresh ok + mouse interaction ok
author | am@osimis.io |
---|---|
date | Mon, 27 Aug 2018 14:41:49 +0200 |
parents | 5de5699ad570 |
children | 8f5d7495076d |
rev | line source |
---|---|
0 | 1 cmake_minimum_required(VERSION 2.8) |
2 project(OrthancStone) | |
3 | |
6 | 4 |
5 ##################################################################### | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
6 ## Configuration for Orthanc |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
7 ##################################################################### |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
8 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
9 include(../../Resources/CMake/Version.cmake) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
10 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
11 if (ORTHANC_STONE_VERSION STREQUAL "mainline") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
12 set(ORTHANC_FRAMEWORK_VERSION "mainline") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
13 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
14 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
15 set(ORTHANC_FRAMEWORK_VERSION "1.3.2") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
16 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
17 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
18 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
19 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
20 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
21 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
22 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
23 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
145
diff
changeset
|
24 ##################################################################### |
6 | 25 ## Build a static library containing the Orthanc Stone framework |
26 ##################################################################### | |
0 | 27 |
115
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
28 include(../../Resources/CMake/OrthancStoneParameters.cmake) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
29 |
145 | 30 LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options) |
31 | |
276
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
275
diff
changeset
|
32 SET(ENABLE_SDL OFF) |
5de5699ad570
first display in QCairoWidget; no mouse interaction yet
am@osimis.io
parents:
275
diff
changeset
|
33 SET(ENABLE_QT ON) |
115
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
34 SET(ORTHANC_SANDBOXED OFF) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
35 SET(ENABLE_CRYPTO_OPTIONS ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
36 SET(ENABLE_GOOGLE_TEST ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
37 SET(ENABLE_WEB_CLIENT ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
38 |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
39 include(../../Resources/CMake/OrthancStoneConfiguration.cmake) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
40 |
127 | 41 add_library(OrthancStone STATIC |
42 ${ORTHANC_STONE_SOURCES} | |
43 ) | |
0 | 44 |
6 | 45 |
46 ##################################################################### | |
47 ## Build all the sample applications | |
48 ##################################################################### | |
49 | |
221
d7b2590744f8
wip: building applications reusable in SDL and WASM
am@osimis.io
parents:
215
diff
changeset
|
50 macro(BuildSample Target Header Sample) |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
51 add_executable(${Target} |
275 | 52 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleMainNative.cpp |
221
d7b2590744f8
wip: building applications reusable in SDL and WASM
am@osimis.io
parents:
215
diff
changeset
|
53 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleInteractor.h |
d7b2590744f8
wip: building applications reusable in SDL and WASM
am@osimis.io
parents:
215
diff
changeset
|
54 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleApplicationBase.h |
d7b2590744f8
wip: building applications reusable in SDL and WASM
am@osimis.io
parents:
215
diff
changeset
|
55 ${ORTHANC_STONE_ROOT}/Applications/Samples/${Header} |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
56 ${APPLICATIONS_SOURCES} |
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
57 ) |
0 | 58 set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample}) |
59 target_link_libraries(${Target} OrthancStone) | |
60 endmacro() | |
61 | |
116 | 62 |
63 # TODO - Re-enable all these samples! | |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
64 |
242 | 65 #BuildSample(OrthancStoneEmpty EmptyApplication.h 1) |
66 #BuildSample(OrthancStoneTestPattern TestPatternApplication.h 2) | |
67 #BuildSample(OrthancStoneSingleFrame SingleFrameApplication.h 3) | |
68 #BuildSample(OrthancStoneSingleVolume SingleVolumeApplication.h 4) | |
69 ##BuildSample(OrthancStoneBasicPetCtFusion 5) | |
70 ##BuildSample(OrthancStoneSynchronizedSeries 6) | |
71 ##BuildSample(OrthancStoneLayoutPetCtFusion 7) | |
235
ce4405d98b92
Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
221
diff
changeset
|
72 BuildSample(OrthancStoneSimpleViewer SimpleViewerApplication.h 8) |
6 | 73 |
74 | |
75 ##################################################################### | |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
76 ## Build the unit tests |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
77 ##################################################################### |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
78 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
79 add_executable(UnitTests |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
80 ${GOOGLE_TEST_SOURCES} |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
242
diff
changeset
|
81 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp |
215 | 82 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
83 ) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
84 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
85 target_link_libraries(UnitTests OrthancStone) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
86 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
87 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
88 ##################################################################### |
6 | 89 ## Generate the documentation if Doxygen is present |
90 ##################################################################### | |
91 | |
92 find_package(Doxygen) | |
93 if (DOXYGEN_FOUND) | |
94 configure_file( | |
215 | 95 ${ORTHANC_STONE_ROOT}/Resources/OrthancStone.doxygen |
6 | 96 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen |
97 @ONLY) | |
98 | |
99 add_custom_target(doc | |
100 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
101 COMMENT "Generating documentation with Doxygen" VERBATIM | |
102 ) | |
103 else() | |
104 message("Doxygen not found. The documentation will not be built.") | |
105 endif() |