# Doxygen documentation # ====================== # add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) # these variables are used in the configuration of the Doxyfile.in set (SPECMICP_SRC_DIR ${PROJECT_SOURCE_DIR}/src) set (SPECMICP_DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set (DOC_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) # Configure doxygen configure_file(Doxyfile.in ${DOC_BINARY_DIR}/Doxyfile @ONLY) # Citations for the documentations add_custom_target(citations SOURCES citations.bib) file(INSTALL citations.bib DESTINATION ${DOC_BINARY_DIR}) # Target to build the documentations add_custom_target(doc_html ${DOXYGEN_EXECUTABLE} ${DOC_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_BINARY_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM ) install(DIRECTORY ${DOC_BINARY_DIR}/html DESTINATION ${SHARE_INSTALL_DIR} OPTIONAL ) else() message(STATUS "Doxygen is not found, the documentation cannot be build") endif(DOXYGEN_FOUND)