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") find_program(SPHINXBUILD_EXECUTABLE sphinx-build DOC "The location of the sphinx-build executable")
if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_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) 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" #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) #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 ${SPHINXBUILD_EXECUTABLE} -b html
-c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir -c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_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() else()
message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.") message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.")
set(BUILD_MANUAL NO PARENT_SCOPE) 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 # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
#language = None language = "en"
# There are two options for replacing |today|: either, you set today to some # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:
@ -227,3 +227,6 @@ doxylink = {
qthelp_basename = "polyvox" qthelp_basename = "polyvox"
primary_domain = "c++" 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: Contents:
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
install
Introduction Introduction
------------ ------------
@ -26,7 +28,7 @@ The most fundermental construct when working with PolyVox is that of the volume.
.. code-block:: c++ .. code-block:: c++
Volume<MaterialDensityPair44> volData(64, 64, 64); Volume<MaterialDensityPair44> volData(64, 64, 64);
As can be seen, the Volume class is templated upon the voxel type. This means it is straight forward to create a volume of integers, floats, or a custom voxel type (see the :polyvox:`Volume documentation <PolyVox::Volume>` for more details). In this particular case we have created a volume in which each voxel is an instance of :polyvox:`MaterialDensityPair44`. Each instance of MaterialDensityPair44 holds both a material and a density and uses four bits of data for each. This means that both the material and the density have a range of 0-15, and each voxel requires one byte of storage. For more information about materials and densities please consult the *principles-of-polyvox* document. As can be seen, the Volume class is templated upon the voxel type. This means it is straight forward to create a volume of integers, floats, or a custom voxel type (see the :polyvox:`Volume documentation <PolyVox::Volume>` for more details). In this particular case we have created a volume in which each voxel is an instance of :polyvox:`MaterialDensityPair44`. Each instance of MaterialDensityPair44 holds both a material and a density and uses four bits of data for each. This means that both the material and the density have a range of 0-15, and each voxel requires one byte of storage. For more information about materials and densities please consult the *principles-of-polyvox* document.
@ -45,6 +47,5 @@ Indices and tables
================== ==================
* :ref:`genindex` * :ref:`genindex`
* :ref:`modindex`
* :ref:`search` * :ref:`search`