2016-09-27 22:01:08 +03:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
|
2013-09-18 00:08:05 +04:00
|
|
|
import sys
|
2013-10-30 17:58:25 +04:00
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import glob
|
2013-09-18 00:08:05 +04:00
|
|
|
|
|
|
|
sys.path.insert(0, r'@conf_path@')
|
|
|
|
|
|
|
|
source_suffix = '.rst'
|
|
|
|
master_doc = 'index'
|
|
|
|
|
2013-11-04 22:36:41 +04:00
|
|
|
project = 'CMake'
|
2013-11-13 18:18:57 +04:00
|
|
|
copyright = '@conf_copyright@'
|
2013-09-18 00:08:05 +04:00
|
|
|
version = '@conf_version@' # feature version
|
|
|
|
release = '@conf_release@' # full version string
|
|
|
|
|
|
|
|
primary_domain = 'cmake'
|
|
|
|
|
|
|
|
exclude_patterns = []
|
|
|
|
|
|
|
|
extensions = ['cmake']
|
2013-11-04 23:17:43 +04:00
|
|
|
templates_path = ['@conf_path@/templates']
|
2013-09-18 00:08:05 +04:00
|
|
|
|
2014-11-07 19:40:44 +03:00
|
|
|
nitpicky = True
|
|
|
|
|
2013-10-30 17:58:25 +04:00
|
|
|
cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst'))
|
|
|
|
cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$')
|
|
|
|
man_pages = []
|
|
|
|
for fpath in cmake_manuals:
|
|
|
|
try:
|
|
|
|
name, sec, rst = os.path.basename(fpath).split('.')
|
|
|
|
desc = None
|
|
|
|
f = open(fpath, 'r')
|
|
|
|
for l in f:
|
|
|
|
m = cmake_manual_description.match(l)
|
|
|
|
if m:
|
|
|
|
desc = m.group(1).strip()
|
|
|
|
break
|
|
|
|
f.close()
|
|
|
|
if desc:
|
|
|
|
man_pages.append(('manual/%s.%s' % (name, sec),
|
|
|
|
name, desc, [], int(sec)))
|
|
|
|
else:
|
|
|
|
sys.stderr.write("ERROR: No cmake-manual-description in '%s'\n" % fpath)
|
2014-04-18 13:19:18 +04:00
|
|
|
except Exception as e:
|
2013-10-30 17:58:25 +04:00
|
|
|
sys.stderr.write("ERROR: %s\n" % str(e))
|
2013-09-18 00:08:05 +04:00
|
|
|
man_show_urls = False
|
|
|
|
|
|
|
|
html_show_sourcelink = True
|
|
|
|
html_static_path = ['@conf_path@/static']
|
|
|
|
html_style = 'cmake.css'
|
2013-11-04 23:17:43 +04:00
|
|
|
html_theme = 'default'
|
|
|
|
html_title = 'CMake %s Documentation' % release
|
|
|
|
html_short_title = '%s Documentation' % release
|
2014-10-29 18:42:03 +03:00
|
|
|
html_favicon = '@conf_path@/static/cmake-favicon.ico'
|
2014-04-10 12:36:43 +04:00
|
|
|
# Not supported yet by sphinx:
|
|
|
|
# https://bitbucket.org/birkenfeld/sphinx/issue/1448/make-qthelp-more-configurable
|
|
|
|
# qthelp_namespace = "org.cmake"
|
|
|
|
# qthelp_qch_name = "CMake-300.qch"
|