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