Skip to content
Snippets Groups Projects
CMakeLists.txt 712 B
Newer Older
option(BUILD_DOC "Build documentation" ON)

include(CMakePrintHelpers)

find_package(Doxygen)
if (DOXYGEN_FOUND)
    set(DOXYGEN_IN ../doxygen/config)    # doxygen config file

    # option ALL allows to build the docs together with the code
    add_custom_target( doc_doxygen ALL
        COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_IN}
        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) # WORKING_DIRECTORY: Execute the command with the given current working directory. If it is a relative path it will be interpreted relative to the build tree directory corresponding to the current source directory.
else()
  message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)