2015-08-09 15:18:42 +01:00
|
|
|
find_package(Sphinx REQUIRED)
|
2013-03-12 00:56:56 -07:00
|
|
|
|
|
|
|
|
# HTML output directory
|
2015-08-09 15:18:42 +01:00
|
|
|
set(SPHINX_HTML_DIR "${CMAKE_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}
|
2013-03-20 17:44:04 -07:00
|
|
|
DESTINATION share/doc/ceres
|
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
|
|
|
|
|
"${CMAKE_SOURCE_DIR}/scripts/make_docs.py"
|
|
|
|
|
"${CMAKE_SOURCE_DIR}"
|
|
|
|
|
"${CMAKE_BINARY_DIR}/docs"
|
|
|
|
|
"${SPHINX_EXECUTABLE}"
|
|
|
|
|
COMMENT "Building HTML documentation with Sphinx")
|