UseDoxygen.cmake 861 B

1234567891011121314151617181920212223242526272829
  1. macro(buildDoxygenDoc)
  2. if (DOXYGEN_FOUND)
  3. # set input and output files
  4. set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in)
  5. set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Documentation/Doxygen/Doxyfile)
  6. # request to configure the file
  7. configure_file(
  8. ${DOXYGEN_IN}
  9. ${DOXYGEN_OUT}
  10. @ONLY
  11. )
  12. # note the option ALL which allows to build the docs together with the application
  13. add_custom_target(Doxygen ALL
  14. COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
  15. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/Doxygen
  16. COMMENT "Generating API documentation(html) with Doxygen"
  17. VERBATIM )
  18. set_target_properties(Doxygen
  19. PROPERTIES
  20. FOLDER Documentation
  21. )
  22. else (DOXYGEN_FOUND)
  23. message("Doxygen need to be installed to generate the doxygen documentation")
  24. endif (DOXYGEN_FOUND)
  25. endmacro()
  26. buildDoxygenDoc()