CMake/Utilities/Sphinx/conf.py.in

48 lines
1.9 KiB
Python
Raw Normal View History

Build Help documentation during CMake build using Sphinx Add a Utilities/Sphinx directory to hold CMake build code to run the Sphinx (sphinx-doc.org) documentation generation tool. Create a CMakeLists.txt file there capable of building either as a subdirectory of the main CMake build, or as a standalone documentation build. Add cache options SPHINX_MAN and SPHINX_HTML to select output formats and SPHINX_EXECUTABLE to specify the sphinx-build executable. Add bootstrap options --sphix-man and --sphinx-html to select output formats and --sphinx-build=<sb> to specify the sphinx-build executable. Create a "conf.py.in" file to configure_file into "conf.py" to tell sphinx-build how to build our documents. Create a "cmake.py" Sphinx extension module defining: * The "cmake-module" directive used in Help/module/*.rst files to scan .rst markup from the corresponding Modules/*.cmake file. * A Sphinx domain called "cmake" defining documentation object types for CMake Help/<type> directories: command, generator, manual, module, policy, prop_*, and variable. Add a "role" for each type to perform cross-references. Teach the roles to treat "<XYZ>" as placeholders instead of explicit targets if not preceded by a space. Add cmake domain directives to define command and variable objects explicitly in .rst file content. This will allow modules to define their own commands and variables and have them indexed and linkable. * A Sphinx document transform that converts Help/<type>/*.rst documents into cmake domain objects of the corresponding <type> and adds index entries for them. This will automatically index all CMake documentation objects and provide cross-reference targets for them with no special markup in the .rst files.
2013-09-18 00:08:05 +04:00
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2013 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
import sys
sys.path.insert(0, r'@conf_path@')
source_suffix = '.rst'
master_doc = 'index'
project = 'CMake'
copyright = '@conf_copyright@'
version = '@conf_version@' # feature version
release = '@conf_release@' # full version string
primary_domain = 'cmake'
exclude_patterns = []
extensions = ['cmake']
man_pages = [
('manual/cmake.1', 'cmake', 'CMake Command-Line Reference', [], 1),
('manual/ccmake.1', 'ccmake', 'CMake Curses Dialog Command-Line Reference', [], 1),
('manual/cmake-gui.1', 'cmake-gui', 'CMake GUI Command-Line Reference', [], 1),
('manual/cpack.1', 'cpack', 'CPack Command-Line Reference', [], 1),
('manual/ctest.1', 'ctest', 'CTest Command-Line Reference', [], 1),
('manual/cmake-commands.7', 'cmake-commands', 'CMake Language Command Reference', [], 7),
('manual/cmake-generators.7', 'cmake-generators', 'CMake Generators Reference', [], 7),
('manual/cmake-modules.7', 'cmake-modules', 'CMake Modules Reference', [], 7),
('manual/cmake-policies.7', 'cmake-policies', 'CMake Policies Reference', [], 7),
('manual/cmake-properties.7', 'cmake-properties', 'CMake Properties Reference', [], 7),
('manual/cmake-variables.7', 'cmake-variables', 'CMake Variables Reference', [], 7),
]
man_show_urls = False
html_show_sourcelink = True
html_static_path = ['@conf_path@/static']
html_style = 'cmake.css'