Mercurial > hg > orthanc-stone
comparison OrthancStone/UnitTestsSources/CMakeLists.txt @ 1877:a2955abe4c2e
skeleton for the RenderingPlugin
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Jan 2022 08:23:38 +0100 |
parents | UnitTestsSources/CMakeLists.txt@7053b8a0aaec |
children | 93c3f9234286 |
comparison
equal
deleted
inserted
replaced
1876:b1f510e601d2 | 1877:a2955abe4c2e |
---|---|
1 # Stone of Orthanc | |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium | |
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
6 # | |
7 # This program is free software: you can redistribute it and/or | |
8 # modify it under the terms of the GNU Lesser General Public License | |
9 # as published by the Free Software Foundation, either version 3 of | |
10 # the License, or (at your option) any later version. | |
11 # | |
12 # This program is distributed in the hope that it will be useful, but | |
13 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 # Lesser General Public License for more details. | |
16 # | |
17 # You should have received a copy of the GNU Lesser General Public | |
18 # License along with this program. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
20 | |
21 | |
22 cmake_minimum_required(VERSION 2.8.10) | |
23 | |
24 project(UnitTests) | |
25 | |
26 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") | |
27 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") | |
28 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/OrthancStoneParameters.cmake) | |
29 | |
30 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") | |
31 set(ORTHANC_BOOST_COMPONENTS program_options) | |
32 | |
33 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") | |
34 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") | |
35 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE) | |
36 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/DownloadPackage.cmake) | |
37 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake) | |
38 | |
39 else() | |
40 set(ENABLE_GOOGLE_TEST ON) | |
41 endif() | |
42 | |
43 set(ENABLE_OPENGL OFF) | |
44 set(ENABLE_PUGIXML ON) | |
45 | |
46 include(${ORTHANC_STONE_ROOT}/../Resources/CMake/OrthancStoneConfiguration.cmake) | |
47 include(${CMAKE_CURRENT_SOURCE_DIR}/UnitTestsSources.cmake) | |
48 | |
49 add_executable(UnitTests | |
50 ${UNIT_TESTS_SOURCES} | |
51 ${AUTOGENERATED_SOURCES} | |
52 ${BOOST_EXTENDED_SOURCES} | |
53 ${GOOGLE_TEST_SOURCES} | |
54 ${ORTHANC_STONE_SOURCES} | |
55 ) | |
56 | |
57 | |
58 ##################################################################### | |
59 ## Generate the documentation if Doxygen is present | |
60 ##################################################################### | |
61 | |
62 find_package(Doxygen) | |
63 if (DOXYGEN_FOUND) | |
64 configure_file( | |
65 ${ORTHANC_STONE_ROOT}/../Resources/OrthancStone.doxygen | |
66 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
67 @ONLY) | |
68 | |
69 add_custom_target(doc | |
70 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen | |
71 COMMENT "Generating documentation with Doxygen" VERBATIM | |
72 ) | |
73 else() | |
74 message("Doxygen not found. The documentation will not be built.") | |
75 endif() |