CMakeLists.txt 738 B

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