Skip to content

Commit 4ae2862

Browse files
committed
Fix documentation build
1 parent a631a41 commit 4ae2862

File tree

3 files changed

+15
-34
lines changed

3 files changed

+15
-34
lines changed

cmake/FindSphinx.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,3 @@ include(FindPackageHandleStandardArgs)
1919
find_package_handle_standard_args(Sphinx
2020
"Failed to locate sphinx-build executable"
2121
SPHINX_EXECUTABLE)
22-
23-
# Provide options for controlling different types of output
24-
option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON)
25-
option(SPHINX_OUTPUT_MAN "Output man pages" ON)
26-

doc/CMakeLists.txt

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,17 @@
88
find_package(Sphinx REQUIRED)
99

1010
add_custom_target(doc ALL)
11+
add_custom_command(TARGET doc
12+
COMMAND "${SPHINX_EXECUTABLE}" -q
13+
-d "${CMAKE_CURRENT_BINARY_DIR}/doctrees"
14+
-b html
15+
"${CMAKE_CURRENT_SOURCE_DIR}"
16+
"${CMAKE_CURRENT_BINARY_DIR}/html"
17+
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
18+
COMMENT "Building HTML documentation with Sphinx"
19+
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/html/index.html"
20+
)
1121

12-
if (SPHINX_OUTPUT_HTML)
13-
add_custom_command(TARGET doc
14-
COMMAND ${SPHINX_EXECUTABLE} -q -b html
15-
"${CMAKE_CURRENT_SOURCE_DIR}"
16-
"${CMAKE_CURRENT_BINARY_DIR}/html"
17-
COMMENT "Building HTML documentation with Sphinx"
18-
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/html"
19-
)
20-
21-
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
22-
DESTINATION "${DOCDIR}"
23-
)
24-
endif()
25-
26-
if (SPHINX_OUTPUT_MAN)
27-
add_custom_command(TARGET doc
28-
COMMAND ${SPHINX_EXECUTABLE} -q -b man
29-
"${CMAKE_CURRENT_SOURCE_DIR}"
30-
"${CMAKE_CURRENT_BINARY_DIR}/man"
31-
COMMENT "Building manpage documentation with Sphinx"
32-
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/man"
33-
)
34-
35-
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/man"
36-
DESTINATION "${MANDIR}"
37-
)
38-
endif()
22+
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/"
23+
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
24+
)

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545

4646
# Add any paths that contain templates here, relative to this directory.
47-
templates_path = ['_templates']
47+
templates_path = []
4848

4949
# The suffix(es) of source filenames.
5050
# You can specify multiple suffix as a list of string:
@@ -88,7 +88,7 @@
8888
# Add any paths that contain custom static files (such as style sheets) here,
8989
# relative to this directory. They are copied after the builtin static files,
9090
# so a file named "default.css" will overwrite the builtin "default.css".
91-
html_static_path = ['_static']
91+
html_static_path = []
9292

9393
# Custom sidebar templates, must be a dictionary that maps document names
9494
# to template names.

0 commit comments

Comments
 (0)