Mercurial > hg > orthanc-stone
annotate Platforms/Generic/CMakeLists.txt @ 370:8ac7161d5fea
integration captain->default
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 05 Nov 2018 10:04:19 +0100 |
parents | 07792a582de9 |
children | d7b2590744f8 |
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 | |
115
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
32 SET(ORTHANC_SANDBOXED OFF) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
33 SET(ENABLE_CRYPTO_OPTIONS ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
34 SET(ENABLE_GOOGLE_TEST ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
35 SET(ENABLE_WEB_CLIENT ON) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
36 |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
37 include(../../Resources/CMake/OrthancStoneConfiguration.cmake) |
f598ffb81cda
fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
114
diff
changeset
|
38 |
127 | 39 add_library(OrthancStone STATIC |
40 ${ORTHANC_STONE_SOURCES} | |
41 ) | |
0 | 42 |
6 | 43 |
44 ##################################################################### | |
45 ## Build all the sample applications | |
46 ##################################################################### | |
47 | |
0 | 48 macro(BuildSample Target Sample) |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
49 add_executable(${Target} |
215 | 50 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleMainSdl.cpp |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
51 ${APPLICATIONS_SOURCES} |
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
52 ) |
0 | 53 set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample}) |
54 target_link_libraries(${Target} OrthancStone) | |
55 endmacro() | |
56 | |
116 | 57 |
58 # TODO - Re-enable all these samples! | |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
59 |
116 | 60 BuildSample(OrthancStoneEmpty 1) |
61 BuildSample(OrthancStoneTestPattern 2) | |
62 BuildSample(OrthancStoneSingleFrame 3) | |
63 BuildSample(OrthancStoneSingleVolume 4) | |
88 | 64 #BuildSample(OrthancStoneBasicPetCtFusion 5) |
81
8677d95753f8
switching to Oracle in SDL samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
62
diff
changeset
|
65 #BuildSample(OrthancStoneSynchronizedSeries 6) |
88 | 66 #BuildSample(OrthancStoneLayoutPetCtFusion 7) |
6 | 67 |
68 | |
69 ##################################################################### | |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
70 ## Build the unit tests |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
71 ##################################################################### |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
72 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
73 add_executable(UnitTests |
113
2eca030792aa
using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
74 ${GOOGLE_TEST_SOURCES} |
215 | 75 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
76 ) |
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 target_link_libraries(UnitTests OrthancStone) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
79 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
80 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
81 ##################################################################### |
6 | 82 ## Generate the documentation if Doxygen is present |
83 ##################################################################### | |
84 | |
85 find_package(Doxygen) | |
86 if (DOXYGEN_FOUND) | |
87 configure_file( | |
215 | 88 ${ORTHANC_STONE_ROOT}/Resources/OrthancStone.doxygen |
6 | 89 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen |
90 @ONLY) | |
91 | |
92 add_custom_target(doc | |
93 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
94 COMMENT "Generating documentation with Doxygen" VERBATIM | |
95 ) | |
96 else() | |
97 message("Doxygen not found. The documentation will not be built.") | |
98 endif() |