Add CMake support for also building Markdown docs in parallel (#49)
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user