diff --git a/CMakeLists.txt b/CMakeLists.txt index 670949a..32b9e7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,9 @@ endif() # Check if we've got the Confuse library find_package(Confuse) +# Check if Doxygen is available +find_package(Doxygen) + ### OwlPS' version ### diff --git a/TODO.t2t b/TODO.t2t index 16723ae..a633c03 100644 --- a/TODO.t2t +++ b/TODO.t2t @@ -56,7 +56,6 @@ Work to do in OwlPS - handle logo/ - use the installation prefix as search prefix for configuration files in Listener, Aggregator and Positioner - - make sure doxygen is available (the FindDoxygen module exists) - make sure txt2tags is available - Support string-based positioning requests diff --git a/owlps-positioner/CMakeLists.txt b/owlps-positioner/CMakeLists.txt index 9375938..be87f1d 100644 --- a/owlps-positioner/CMakeLists.txt +++ b/owlps-positioner/CMakeLists.txt @@ -138,11 +138,20 @@ add_custom_target(check_positioner COMMENT "Checking source code") # Documentation -set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc") -set(DOXYGEN - DOXYGEN_OUTPUT_DIRECTORY=${DOXYGEN_OUTPUT_DIRECTORY} OWLPS_VERSION=${OWLPS_VERSION} doxygen) -set(DOXYFILE Doxyfile) -add_custom_target(doc_positioner - ${DOXYGEN} ${DOXYFILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generating Doxygen documentation for OwlPS Positioner in \"${DOXYGEN_OUTPUT_DIRECTORY}\"") +if (DOXYGEN_FOUND) + if (NOT DOXYGEN_DOT_FOUND) + message(WARNING + "Couldn't find Graphviz: you should install it if you want to generate diagrams in the OwlPS Positioner's HTML documentation") + endif() + set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc") + set(DOXYGEN + DOXYGEN_OUTPUT_DIRECTORY=${DOXYGEN_OUTPUT_DIRECTORY} OWLPS_VERSION=${OWLPS_VERSION} "${DOXYGEN_EXECUTABLE}") + set(DOXYFILE Doxyfile) + add_custom_target(doc_positioner + ${DOXYGEN} ${DOXYFILE} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generating Doxygen documentation for OwlPS Positioner in \"${DOXYGEN_OUTPUT_DIRECTORY}\"") +else() + message(WARNING + "Couldn't find Doxygen: disabling OwlPS Positioner's documentation target") +endif()