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