CMakeLists.txt 740 B

123456789101112131415161718192021
  1. # HTML output directory
  2. set(SPHINX_HTML_DIR "${Ceres_BINARY_DIR}/docs/html")
  3. # Install documentation
  4. install(DIRECTORY ${SPHINX_HTML_DIR}
  5. DESTINATION ${CMAKE_INSTALL_DOCDIR}
  6. COMPONENT Doc
  7. PATTERN "${SPHINX_HTML_DIR}/*")
  8. # Find python
  9. find_package(Python REQUIRED COMPONENTS Interpreter)
  10. # Building using 'make_docs.py' python script
  11. add_custom_target(ceres_docs ALL
  12. $<TARGET_FILE:Python::Interpreter>
  13. "${Ceres_SOURCE_DIR}/scripts/make_docs.py"
  14. "${Ceres_SOURCE_DIR}"
  15. "${Ceres_BINARY_DIR}/docs"
  16. "${Sphinx_BUILD_EXECUTABLE}"
  17. USES_TERMINAL
  18. COMMENT "Building HTML documentation with Sphinx")