doxygen.cmake 1.0 KB

12345678910111213141516171819
  1. # add a target to generate API documentation with Doxygen
  2. find_package(Doxygen)
  3. if(NOT DOXYGEN_FOUND)
  4. find_program(DOXYGEN_EXECUTABLE doxygen)
  5. endif()
  6. if(DEFINED DOXYGEN_EXECUTABLE)
  7. message(STATUS "Using doxygen to generate documenation: ${DOXYGEN_EXECUTABLE}")
  8. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
  9. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/customdoxygen.css ${CMAKE_CURRENT_BINARY_DIR}/customdoxygen.css COPYONLY)
  10. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/header.html ${CMAKE_CURRENT_BINARY_DIR}/header.html COPYONLY)
  11. file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html)
  12. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/TitilliumWeb.woff2 ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html/TitilliumWeb.woff2 COPYONLY)
  13. add_custom_target(doc
  14. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
  15. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  16. COMMENT "Generating API documentation with Doxygen" VERBATIM
  17. )
  18. endif()