# We need Doxygen
find_package (Doxygen)
# path to the project's .dox file to include
set (DOXYGEN_DOX_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.dox")
# path to store doxygen output in, as html/latext subdirs
set (DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
# path to generated doxygen .conf file
set (DOXYGEN_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf")
# only set up doxygen if needed
if (DOXYGEN_FOUND)
# build the doxygen config file
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in"
${DOXYGEN_CONFIG}
@ONLY
)
# add custom 'doc' target
add_custom_target (doc
${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG}
)
else (DOXYGEN_FOUND)
message (STATUS "Doxygen: not found")
endif (DOXYGEN_FOUND)