Add CMake support for also building Markdown docs in parallel (#49)

This commit is contained in:
Jared Dillard
2025-10-26 20:11:09 -07:00
committed by GitHub
parent b63801bcff
commit e2a80faf04
7 changed files with 120 additions and 12 deletions
+24
View File
@@ -0,0 +1,24 @@
# Find Sphinx
include(SetupSphinx)
setup_sphinx_environment()
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/source)
set(SPHINX_BUILD ${CMAKE_BINARY_DIR})
# Build HTML documentation
add_custom_target(html
COMMAND ${SPHINX_EXECUTABLE} -b html ${SPHINX_SOURCE} ${SPHINX_BUILD}
COMMENT "Building HTML documentation"
VERBATIM
)
# Build markdown documentation
add_custom_target(markdown
COMMAND ${SPHINX_EXECUTABLE} -b markdown ${SPHINX_SOURCE} ${SPHINX_BUILD}
COMMENT "Building Markdown documentation"
VERBATIM
)
# Build both formats
add_custom_target(docs ALL)
add_dependencies(docs html markdown)
+1
View File
@@ -4,3 +4,4 @@ sphinx-contributors
sphinx
sphinx-llms-txt
sphinxext-opengraph
sphinx-markdown-builder