Merge pull request #477 from naxuroqa/master

moved conf.py to its right place
This commit is contained in:
irungentoo 2013-08-16 10:01:02 -07:00
commit c5af8f44a9
2 changed files with 38 additions and 40 deletions

View File

@ -1,40 +1,38 @@
# cmake should not fail if sphinx is missing find_package(Sphinx QUIET)
find_package(Sphinx)
if(SPHINX_EXECUTABLE) if(NOT DEFINED SPHINX_THEME)
set(SPHINX_THEME default)
if(NOT DEFINED SPHINX_THEME) endif()
set(SPHINX_THEME default)
endif() if(NOT DEFINED SPHINX_THEME_DIR)
set(SPHINX_THEME_DIR)
if(NOT DEFINED SPHINX_THEME_DIR) endif()
set(SPHINX_THEME_DIR)
endif() # configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") # Sphinx cache with pickled ReST documents
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
# 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")
# HTML output directory
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
configure_file( "${BINARY_BUILD_DIR}/conf.py"
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py" @ONLY)
"${BINARY_BUILD_DIR}/conf.py"
@ONLY) if(SPHINX_FOUND)
add_custom_target(docs
add_custom_target(docs ${SPHINX_EXECUTABLE}
${SPHINX_EXECUTABLE} -b html
-b html -c "${BINARY_BUILD_DIR}"
-c "${BINARY_BUILD_DIR}" -d "${SPHINX_CACHE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
"${SPHINX_HTML_DIR}" "${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx") COMMENT "Building HTML documentation with Sphinx")
else() else()
add_custom_target(docs add_custom_target(docs
echo echo "Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest"
"Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest" - COMMENT "No sphinx executable found")
COMMENT "No sphinx executebale found")
endif() endif()

View File

@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'default' html_theme = '@SPHINX_THEME@'
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the
@ -99,7 +99,7 @@ html_theme = 'default'
#html_theme_options = {} #html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = [] html_theme_path = ['@SPHINX_THEME_DIR@']
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".