summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-16 10:01:02 -0700
committerirungentoo <irungentoo@gmail.com>2013-08-16 10:01:02 -0700
commitc5af8f44a9d040a0bbe0442ec074d9fc8562dd32 (patch)
treecef16a0da8b44c92e7efa4959618993fe6779c95
parent173101624cdb91a01b14938cbf475d89ef8f5d4d (diff)
parentcc21c62b71ff9fc8917c5a05ff99c911a024a6e7 (diff)
Merge pull request #477 from naxuroqa/master
moved conf.py to its right place
-rw-r--r--docs/CMakeLists.txt72
-rw-r--r--docs/conf.py.in (renamed from docs/conf.py)4
2 files changed, 37 insertions, 39 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 14126cfd..4b281eb4 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -1,40 +1,38 @@
1# cmake should not fail if sphinx is missing 1find_package(Sphinx QUIET)
2find_package(Sphinx)
3 2
4if(SPHINX_EXECUTABLE) 3if(NOT DEFINED SPHINX_THEME)
5 4 set(SPHINX_THEME default)
6 if(NOT DEFINED SPHINX_THEME) 5endif()
7 set(SPHINX_THEME default) 6
8 endif() 7if(NOT DEFINED SPHINX_THEME_DIR)
9 8 set(SPHINX_THEME_DIR)
10 if(NOT DEFINED SPHINX_THEME_DIR) 9endif()
11 set(SPHINX_THEME_DIR) 10
12 endif() 11# configured documentation tools and intermediate build results
13 12set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
14 # configured documentation tools and intermediate build results 13
15 set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") 14# Sphinx cache with pickled ReST documents
16 15set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
17 # Sphinx cache with pickled ReST documents 16
18 set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") 17# HTML output directory
19 18set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
20 # HTML output directory 19
21 set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") 20configure_file(
22 21 "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
23 configure_file( 22 "${BINARY_BUILD_DIR}/conf.py"
24 "${CMAKE_CURRENT_SOURCE_DIR}/conf.py" 23 @ONLY)
25 "${BINARY_BUILD_DIR}/conf.py" 24
26 @ONLY) 25if(SPHINX_FOUND)
27 26 add_custom_target(docs
28 add_custom_target(docs 27 ${SPHINX_EXECUTABLE}
29 ${SPHINX_EXECUTABLE} 28 -b html
30 -b html 29 -c "${BINARY_BUILD_DIR}"
31 -c "${BINARY_BUILD_DIR}" 30 -d "${SPHINX_CACHE_DIR}"
32 "${CMAKE_CURRENT_SOURCE_DIR}" 31 "${CMAKE_CURRENT_SOURCE_DIR}"
33 "${SPHINX_HTML_DIR}" 32 "${SPHINX_HTML_DIR}"
34 COMMENT "Building HTML documentation with Sphinx") 33 COMMENT "Building HTML documentation with Sphinx")
35else() 34else()
36 add_custom_target(docs 35 add_custom_target(docs
37 echo 36 echo "Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest"
38 "Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest" 37- COMMENT "No sphinx executable found")
39 COMMENT "No sphinx executebale found")
40endif() 38endif()
diff --git a/docs/conf.py b/docs/conf.py.in
index afebb632..260e77a8 100644
--- a/docs/conf.py
+++ b/docs/conf.py.in
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
91 91
92# The theme to use for HTML and HTML Help pages. See the documentation for 92# The theme to use for HTML and HTML Help pages. See the documentation for
93# a list of builtin themes. 93# a list of builtin themes.
94html_theme = 'default' 94html_theme = '@SPHINX_THEME@'
95 95
96# Theme options are theme-specific and customize the look and feel of a theme 96# Theme options are theme-specific and customize the look and feel of a theme
97# further. For a list of options available for each theme, see the 97# further. For a list of options available for each theme, see the
@@ -99,7 +99,7 @@ html_theme = 'default'
99#html_theme_options = {} 99#html_theme_options = {}
100 100
101# Add any paths that contain custom themes here, relative to this directory. 101# Add any paths that contain custom themes here, relative to this directory.
102#html_theme_path = [] 102html_theme_path = ['@SPHINX_THEME_DIR@']
103 103
104# The name for this set of Sphinx documents. If None, it defaults to 104# The name for this set of Sphinx documents. If None, it defaults to
105# "<project> v<release> documentation". 105# "<project> v<release> documentation".