Mercurial > hg > orthanc-stone
annotate CMakeLists.txt @ 92:961ee171d933 wasm
cleaning up
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 May 2017 11:42:53 +0200 |
parents | 90bf4116a23c |
children | fcec0ab44054 |
rev | line source |
---|---|
0 | 1 cmake_minimum_required(VERSION 2.8) |
2 project(OrthancStone) | |
3 | |
6 | 4 |
5 ##################################################################### | |
6 ## Build a static library containing the Orthanc Stone framework | |
7 ##################################################################### | |
0 | 8 |
22
b01d46e5a2b3
support for sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
21
diff
changeset
|
9 SET(STONE_SANDBOXED OFF) |
6 | 10 include(Resources/CMake/OrthancStone.cmake) |
2 | 11 add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES}) |
0 | 12 |
6 | 13 |
14 ##################################################################### | |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
15 ## CMake parameters for Google Test |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
16 ##################################################################### |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
17 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
18 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
19 SET(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
20 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
21 include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
22 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
23 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
24 ##################################################################### |
6 | 25 ## Build all the sample applications |
26 ##################################################################### | |
27 | |
0 | 28 macro(BuildSample Target Sample) |
51 | 29 add_executable(${Target} Applications/Samples/SampleMainSdl.cpp) |
0 | 30 set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample}) |
31 target_link_libraries(${Target} OrthancStone) | |
32 endmacro() | |
33 | |
34 BuildSample(OrthancStoneEmpty 1) | |
35 BuildSample(OrthancStoneTestPattern 2) | |
62 | 36 BuildSample(OrthancStoneSingleFrame 3) |
81
8677d95753f8
switching to Oracle in SDL samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
62
diff
changeset
|
37 #BuildSample(OrthancStoneSingleVolume 4) |
88 | 38 #BuildSample(OrthancStoneBasicPetCtFusion 5) |
81
8677d95753f8
switching to Oracle in SDL samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
62
diff
changeset
|
39 #BuildSample(OrthancStoneSynchronizedSeries 6) |
88 | 40 #BuildSample(OrthancStoneLayoutPetCtFusion 7) |
6 | 41 |
42 | |
43 ##################################################################### | |
20
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
44 ## Build the unit tests |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
45 ##################################################################### |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
46 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
47 add_executable(UnitTests |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
48 ${GTEST_SOURCES} |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
49 UnitTestsSources/UnitTestsMain.cpp |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
50 ) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
51 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
52 target_link_libraries(UnitTests OrthancStone) |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
53 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
54 |
946377d1c992
skeleton for unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
6
diff
changeset
|
55 ##################################################################### |
6 | 56 ## Generate the documentation if Doxygen is present |
57 ##################################################################### | |
58 | |
59 find_package(Doxygen) | |
60 if (DOXYGEN_FOUND) | |
61 configure_file( | |
62 ${ORTHANC_STONE_DIR}/Resources/OrthancStone.doxygen | |
63 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
64 @ONLY) | |
65 | |
66 add_custom_target(doc | |
67 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
68 COMMENT "Generating documentation with Doxygen" VERBATIM | |
69 ) | |
70 else() | |
71 message("Doxygen not found. The documentation will not be built.") | |
72 endif() |