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