2013-03-12 00:56:56 -07:00
|
|
|
# HTML output directory
|
2017-04-02 20:39:38 +01:00
|
|
|
set(SPHINX_HTML_DIR "${Ceres_BINARY_DIR}/docs/html")
|
2013-03-12 00:56:56 -07:00
|
|
|
|
|
|
|
|
# Install documentation
|
2015-08-09 15:18:42 +01:00
|
|
|
install(DIRECTORY ${SPHINX_HTML_DIR}
|
2022-02-16 01:18:43 +01:00
|
|
|
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
2013-03-12 00:56:56 -07:00
|
|
|
COMPONENT Doc
|
|
|
|
|
PATTERN "${SPHINX_HTML_DIR}/*")
|
|
|
|
|
|
2023-09-09 20:55:57 +02:00
|
|
|
# Find python
|
|
|
|
|
find_package(Python REQUIRED COMPONENTS Interpreter)
|
2021-06-19 03:09:09 +02:00
|
|
|
|
2013-03-12 00:56:56 -07:00
|
|
|
# Building using 'make_docs.py' python script
|
2015-08-09 15:18:42 +01:00
|
|
|
add_custom_target(ceres_docs ALL
|
2023-09-09 20:55:57 +02:00
|
|
|
$<TARGET_FILE:Python::Interpreter>
|
2017-04-02 20:39:38 +01:00
|
|
|
"${Ceres_SOURCE_DIR}/scripts/make_docs.py"
|
|
|
|
|
"${Ceres_SOURCE_DIR}"
|
|
|
|
|
"${Ceres_BINARY_DIR}/docs"
|
2023-09-10 15:25:31 +02:00
|
|
|
"${Sphinx_BUILD_EXECUTABLE}"
|
2022-05-28 20:29:04 +02:00
|
|
|
USES_TERMINAL
|
2013-03-12 00:56:56 -07:00
|
|
|
COMMENT "Building HTML documentation with Sphinx")
|