mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
55b4c3f447
This prevents Sphinx output to be stripped of colors, emphasis etc. Change-Id: I127e02cbdda69a5d49a73678a7a7e2b4512b189e
24 lines
738 B
CMake
24 lines
738 B
CMake
find_package(Sphinx REQUIRED)
|
|
|
|
# HTML output directory
|
|
set(SPHINX_HTML_DIR "${Ceres_BINARY_DIR}/docs/html")
|
|
|
|
# Install documentation
|
|
install(DIRECTORY ${SPHINX_HTML_DIR}
|
|
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
|
COMPONENT Doc
|
|
PATTERN "${SPHINX_HTML_DIR}/*")
|
|
|
|
# Find python 3
|
|
find_package(PythonInterp 3 REQUIRED)
|
|
|
|
# Building using 'make_docs.py' python script
|
|
add_custom_target(ceres_docs ALL
|
|
${PYTHON_EXECUTABLE}
|
|
"${Ceres_SOURCE_DIR}/scripts/make_docs.py"
|
|
"${Ceres_SOURCE_DIR}"
|
|
"${Ceres_BINARY_DIR}/docs"
|
|
"${SPHINX_EXECUTABLE}"
|
|
USES_TERMINAL
|
|
COMMENT "Building HTML documentation with Sphinx")
|