aheinecke@405: # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@405: # Software engineering by Intevation GmbH aheinecke@405: # aheinecke@405: # This file is Free Software under the GNU GPL (v>=2) aheinecke@405: # and comes with ABSOLUTELY NO WARRANTY! aheinecke@405: # See LICENSE.txt for details. aheinecke@405: aheinecke@24: include (FindDoxygen) aheinecke@24: aheinecke@24: set_directory_properties (PROPERTIES CLEAN_NO_CUSTOM true) aheinecke@24: set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ".built-html") aheinecke@24: aheinecke@24: if (NOT DOXYGEN_EXECUTABLE) aheinecke@24: message (STATUS "WARNING: Doxygen is required to build the docs.") aheinecke@24: else() aheinecke@24: add_custom_target (doc COMMENT "Building documentation..." aheinecke@24: DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/.built-html) aheinecke@24: endif() aheinecke@24: aheinecke@24: add_custom_command (OUTPUT .built-html aheinecke@24: COMMAND sh aheinecke@24: ARGS -c \"${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile && touch ${CMAKE_CURRENT_BINARY_DIR}/.built-html\;\" aheinecke@24: ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile aheinecke@24: )