Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 1 | # HTML output directory |
| 2 | set(SPHINX_HTML_DIR "${Ceres_BINARY_DIR}/docs/html") |
| 3 | |
| 4 | # Install documentation |
| 5 | install(DIRECTORY ${SPHINX_HTML_DIR} |
Austin Schuh | 3de38b0 | 2024-06-25 18:25:10 -0700 | [diff] [blame^] | 6 | DESTINATION ${CMAKE_INSTALL_DOCDIR} |
Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 7 | COMPONENT Doc |
| 8 | PATTERN "${SPHINX_HTML_DIR}/*") |
| 9 | |
Austin Schuh | 3de38b0 | 2024-06-25 18:25:10 -0700 | [diff] [blame^] | 10 | # Find python |
| 11 | find_package(Python REQUIRED COMPONENTS Interpreter) |
| 12 | |
Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 13 | # Building using 'make_docs.py' python script |
| 14 | add_custom_target(ceres_docs ALL |
Austin Schuh | 3de38b0 | 2024-06-25 18:25:10 -0700 | [diff] [blame^] | 15 | $<TARGET_FILE:Python::Interpreter> |
Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 16 | "${Ceres_SOURCE_DIR}/scripts/make_docs.py" |
| 17 | "${Ceres_SOURCE_DIR}" |
| 18 | "${Ceres_BINARY_DIR}/docs" |
Austin Schuh | 3de38b0 | 2024-06-25 18:25:10 -0700 | [diff] [blame^] | 19 | "${Sphinx_BUILD_EXECUTABLE}" |
| 20 | USES_TERMINAL |
Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 21 | COMMENT "Building HTML documentation with Sphinx") |