mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Set up Sphinx to automatically invoke Doxygen if needed
This commit is contained in:
+19
-5
@@ -1,8 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# libicsneo documentation build configuration file, created by
|
||||
# sphinx-quickstart on Tue Nov 20 14:25:27 2018.
|
||||
# NOTE: The conf.py file is automatically updated by CMake when there are
|
||||
# changes to the version. Update the conf.py.template and then build to
|
||||
# propagate changes here. This file should be committed so that
|
||||
# ReadTheDocs can use it.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
@@ -17,7 +19,8 @@
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
import os
|
||||
import subprocess
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
@@ -33,9 +36,20 @@
|
||||
# ones.
|
||||
extensions = ['sphinx.ext.imgmath', 'sphinx.ext.todo', 'breathe' ]
|
||||
|
||||
breathe_projects = { "libicsneo": "@CMAKE_CURRENT_BINARY_DIR@/doc_doxygen/xml/" }
|
||||
breathe_projects = { "libicsneo": "build/doxygen/xml" }
|
||||
breathe_default_project = "libicsneo"
|
||||
|
||||
try:
|
||||
os.makedirs('build/sphinx')
|
||||
except FileExistsError:
|
||||
pass
|
||||
try:
|
||||
os.makedirs('build/doxygen')
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
subprocess.call('cd ..; doxygen docs/Doxyfile', shell=True)
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
@@ -99,7 +113,7 @@ html_theme_options = {
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['@SPHINX_HTML_DIR@/_static']
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
|
||||
Reference in New Issue
Block a user