blob: 1f8fed8707b60a2934b7880b85b36a6af29b0fbe [file] [log] [blame]
Austin Schuh70cc9552019-01-21 19:46:48 -08001# HTML output directory
2set(SPHINX_HTML_DIR "${Ceres_BINARY_DIR}/docs/html")
3
4# Install documentation
5install(DIRECTORY ${SPHINX_HTML_DIR}
Austin Schuh3de38b02024-06-25 18:25:10 -07006 DESTINATION ${CMAKE_INSTALL_DOCDIR}
Austin Schuh70cc9552019-01-21 19:46:48 -08007 COMPONENT Doc
8 PATTERN "${SPHINX_HTML_DIR}/*")
9
Austin Schuh3de38b02024-06-25 18:25:10 -070010# Find python
11find_package(Python REQUIRED COMPONENTS Interpreter)
12
Austin Schuh70cc9552019-01-21 19:46:48 -080013# Building using 'make_docs.py' python script
14add_custom_target(ceres_docs ALL
Austin Schuh3de38b02024-06-25 18:25:10 -070015 $<TARGET_FILE:Python::Interpreter>
Austin Schuh70cc9552019-01-21 19:46:48 -080016 "${Ceres_SOURCE_DIR}/scripts/make_docs.py"
17 "${Ceres_SOURCE_DIR}"
18 "${Ceres_BINARY_DIR}/docs"
Austin Schuh3de38b02024-06-25 18:25:10 -070019 "${Sphinx_BUILD_EXECUTABLE}"
20 USES_TERMINAL
Austin Schuh70cc9552019-01-21 19:46:48 -080021 COMMENT "Building HTML documentation with Sphinx")