Skip to content
Snippets Groups Projects
DD4hepDoxygen.cmake 649 B
Newer Older
Pere Mato's avatar
Pere Mato committed
#---Add a target to generate API documentation with Doxygen-------------------------
find_package(Doxygen)
Pere Mato's avatar
Pere Mato committed
if(DOXYGEN_FOUND)
Pere Mato's avatar
Pere Mato committed
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
Pere Mato's avatar
Pere Mato committed
  add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                    COMMENT "Generating API documentation with Doxygen" VERBATIM)

  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
    DESTINATION doc
    )

Pere Mato's avatar
Pere Mato committed
else()
  message(STATUS "Doxygen command not found. Documentation target (doc) not available")
endif()