comparison UnitTestsSources/CMakeLists.txt @ 1595:621e4e11783d

doxygen target, more consistent ORTHANC_STONE_ROOT
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 26 Oct 2020 17:42:13 +0100
parents 8c5f9864545f
children 5b8b88e5bfd6
comparison
equal deleted inserted replaced
1594:74ed691f9c64 1595:621e4e11783d
27 set(ORTHANC_BOOST_COMPONENTS program_options) 27 set(ORTHANC_BOOST_COMPONENTS program_options)
28 28
29 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") 29 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
30 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") 30 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
31 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE) 31 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
32 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/DownloadPackage.cmake) 32 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/DownloadPackage.cmake)
33 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake) 33 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
34 34
35 else() 35 else()
36 set(ENABLE_GOOGLE_TEST ON) 36 set(ENABLE_GOOGLE_TEST ON)
37 endif() 37 endif()
38 38
39 set(ENABLE_OPENGL OFF) 39 set(ENABLE_OPENGL OFF)
40 set(ENABLE_PUGIXML ON) 40 set(ENABLE_PUGIXML ON)
41 41
42 include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake) 42 include(${ORTHANC_STONE_ROOT}/../Resources/CMake/OrthancStoneConfiguration.cmake)
43 43
44 add_executable(UnitTests 44 add_executable(UnitTests
45 ${CMAKE_SOURCE_DIR}/GenericToolboxTests.cpp 45 ${CMAKE_SOURCE_DIR}/GenericToolboxTests.cpp
46 ${CMAKE_SOURCE_DIR}/ImageToolboxTests.cpp 46 ${CMAKE_SOURCE_DIR}/ImageToolboxTests.cpp
47 ${CMAKE_SOURCE_DIR}/PixelTestPatternsTests.cpp 47 ${CMAKE_SOURCE_DIR}/PixelTestPatternsTests.cpp
56 ${GOOGLE_TEST_SOURCES} 56 ${GOOGLE_TEST_SOURCES}
57 ${ORTHANC_STONE_SOURCES} 57 ${ORTHANC_STONE_SOURCES}
58 ) 58 )
59 59
60 target_link_libraries(UnitTests ${DCMTK_LIBRARIES}) 60 target_link_libraries(UnitTests ${DCMTK_LIBRARIES})
61
62
63 #####################################################################
64 ## Generate the documentation if Doxygen is present
65 #####################################################################
66
67 find_package(Doxygen)
68 if (DOXYGEN_FOUND)
69 configure_file(
70 ${ORTHANC_STONE_ROOT}/../Resources/OrthancStone.doxygen
71 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
72 @ONLY)
73
74 add_custom_target(doc
75 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
76 COMMENT "Generating documentation with Doxygen" VERBATIM
77 )
78 else()
79 message("Doxygen not found. The documentation will not be built.")
80 endif()