Make manual depend on doc.

Tweak some Sphinx/CMake stuff.
This commit is contained in:
Matt Williams 2010-07-20 13:24:28 +00:00
parent 5cbd0981eb
commit d45604c80b
3 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,9 @@
find_program(SPHINXBUILD_EXECUTABLE sphinx-build DOC "The location of the sphinx-build executable")
if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
message(STATUS "Found `sphinx-build` at ${SPHINXBUILD_EXECUTABLE}")
set(BUILD_MANUAL YES PARENT_SCOPE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
#Generates the HTML docs and the Qt help file which can be opened with "assistant -collectionFile thermite.qhc"
#add_custom_target(manual ${SPHINXBUILD_EXECUTABLE} -b qthelp ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE} polyvox.qhcp -o polyvox.qhc)
@ -8,8 +11,9 @@ if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
${SPHINXBUILD_EXECUTABLE} -b html
-c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building PolyVox manual"
)
set(BUILD_MANUAL YES PARENT_SCOPE)
add_dependencies(manual doc)
else()
message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.")
set(BUILD_MANUAL NO PARENT_SCOPE)

View File

@ -54,7 +54,7 @@ release = '@POLYVOX_VERSION@'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
language = "en"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@ -227,3 +227,6 @@ doxylink = {
qthelp_basename = "polyvox"
primary_domain = "c++"
# Default higlighting scheme to use for `code-block` directives
highlight_language = "c++"

View File

@ -9,7 +9,9 @@ Welcome to PolyVox's documentation!
Contents:
.. toctree::
:maxdepth: 2
:maxdepth: 1
install
Introduction
------------
@ -45,6 +47,5 @@ Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`