2015-08-09 15:18:42 +01:00
|
|
|
find_package(Sphinx REQUIRED)
|
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}
|
2016-01-08 14:27:36 +01:00
|
|
|
DESTINATION "${CERES_DOCS_INSTALL_DIR}"
|
2013-03-12 00:56:56 -07:00
|
|
|
COMPONENT Doc
|
|
|
|
|
PATTERN "${SPHINX_HTML_DIR}/*")
|
|
|
|
|
|
|
|
|
|
# Building using 'make_docs.py' python script
|
2015-08-09 15:18:42 +01:00
|
|
|
add_custom_target(ceres_docs ALL
|
2013-03-12 00:56:56 -07:00
|
|
|
python
|
2017-04-02 20:39:38 +01:00
|
|
|
"${Ceres_SOURCE_DIR}/scripts/make_docs.py"
|
|
|
|
|
"${Ceres_SOURCE_DIR}"
|
|
|
|
|
"${Ceres_BINARY_DIR}/docs"
|
2013-03-12 00:56:56 -07:00
|
|
|
"${SPHINX_EXECUTABLE}"
|
|
|
|
|
COMMENT "Building HTML documentation with Sphinx")
|