# HG changeset patch # User Sebastien Jodogne # Date 1476715474 -7200 # Node ID b8100f56d513132bfea7257a9b8a9c40d29f397c # Parent 00ff2cd06d13f36bdac752d17cbc8f257e474d26 doxygen diff -r 00ff2cd06d13 -r b8100f56d513 CMakeLists.txt --- a/CMakeLists.txt Mon Oct 17 08:37:54 2016 +0200 +++ b/CMakeLists.txt Mon Oct 17 16:44:34 2016 +0200 @@ -1,10 +1,19 @@ cmake_minimum_required(VERSION 2.8) project(OrthancStone) -include(Resources/CMake/OrthancStone.cmake) + +##################################################################### +## Build a static library containing the Orthanc Stone framework +##################################################################### +include(Resources/CMake/OrthancStone.cmake) add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES}) + +##################################################################### +## Build all the sample applications +##################################################################### + macro(BuildSample Target Sample) add_executable(${Target} Samples/SampleMainSdl.cpp) set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample}) @@ -18,3 +27,23 @@ BuildSample(OrthancStoneBasicPetCtFusion 5) BuildSample(OrthancStoneSynchronizedSeries 6) BuildSample(OrthancStoneLayoutPetCtFusion 7) + + +##################################################################### +## Generate the documentation if Doxygen is present +##################################################################### + +find_package(Doxygen) +if (DOXYGEN_FOUND) + configure_file( + ${ORTHANC_STONE_DIR}/Resources/OrthancStone.doxygen + ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen + @ONLY) + + add_custom_target(doc + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen + COMMENT "Generating documentation with Doxygen" VERBATIM + ) +else() + message("Doxygen not found. The documentation will not be built.") +endif()