You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. find_package(Doxygen)
  2. option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" OFF)
  3. if(BUILD_DOCUMENTATION)
  4. if(NOT DOXYGEN_FOUND)
  5. message(FATAL_ERROR "Doxygen is needed to build the documentation.")
  6. endif()
  7. file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
  8. set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/src/Doxyfile.in)
  9. set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
  10. configure_file(${doxyfile_in} ${doxyfile} @ONLY)
  11. add_custom_target(doc
  12. COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
  13. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  14. COMMENT "Generating API documentation with Doxygen"
  15. VERBATIM)
  16. install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${DIST_DOCDIR})
  17. install(DIRECTORY doc/ DESTINATION ${DIST_DOCDIR}/html)
  18. endif()
  19. # Sphinx Documentation
  20. install(DIRECTORY DESTINATION "${DIST_DOCTMP}/sphinx")
  21. install(DIRECTORY DESTINATION "${DIST_DOCTMP}/sphinx/templates")
  22. # Collect all sphinx documentation files from all projects
  23. file(GLOB SPHINX_DOC_DIRS LIST_DIRECTORIES true LIST_FILES false "${PROJECT_SOURCE_DIR}/plugins/processing/*")
  24. foreach(DOCDIR ${SPHINX_DOC_DIRS})
  25. if(IS_DIRECTORY "${DOCDIR}/doc/boxes")
  26. INSTALL(DIRECTORY "${DOCDIR}/doc/boxes" DESTINATION ${DIST_DOCTMP}/sphinx/source)
  27. endif()
  28. endforeach()
  29. INSTALL(DIRECTORY sphinx/source DESTINATION ${DIST_DOCTMP}/sphinx)
  30. INSTALL(FILES sphinx/make.bat DESTINATION ${DIST_DOCTMP}/sphinx)
  31. INSTALL(FILES sphinx/Makefile DESTINATION ${DIST_DOCTMP}/sphinx)
  32. INSTALL(FILES sphinx/build-documentation.cmd DESTINATION ${DIST_DOCTMP})
  33. INSTALL(FILES sphinx/build-documentation.sh DESTINATION ${DIST_DOCTMP})