Private
Public Access
2
0

sphinx: make python documentation generation use sphinx

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-02 09:51:42 +01:00
parent be92ed306d
commit 77b2e484d7
6 changed files with 419 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
if (DOXYGEN_FOUND)
find_package (Sphinx)
if (SPHINX_FOUND)
if (NOT DEFINED SPHINX_THEME)
set (SPHINX_THEME default)
endif ()
if (NOT DEFINED SPHINX_THEME_DIR)
set (SPHINX_THEME_DIR)
endif ()
# configured documentation tools and intermediate build results
set (BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}")
# Sphinx cache with pickled ReST documents
set (SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/doctrees")
# HTML output directory
set (SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
# doc .rst locations
set (SPHINX_DOC_LOATION "${CMAKE_CURRENT_SOURCE_DIR}")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
"${BINARY_BUILD_DIR}/conf.py"
@ONLY
)
add_custom_target(sphinx ALL
${SPHINX_EXECUTABLE} -b html
-c "${BINARY_BUILD_DIR}"
-d "${SPHINX_CACHE_DIR}"
"${SPHINX_DOC_LOATION}"
"${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx"
)
add_dependencies (sphinx ${SWIG_MODULE_pymaa_REAL_NAME})
endif ()
endif ()