Improve C++ documentation shell

Doxygen's markdown support can't quite deal with the Github flavor,
the language reference looks terrible.

So instead, this change switches to using Sphinx,
with two extensions that call Doxygen for us and allow including markdown.

The result is a read-the-docs themed sphinx site that includes search even
in the language reference.
This commit is contained in:
Simon Hausmann 2020-08-24 16:29:54 +02:00
parent 063ff45d0c
commit e9685c5851
8 changed files with 145 additions and 2571 deletions

View file

@ -84,7 +84,18 @@ install(FILES
)
find_package(Doxygen)
find_program(PipEnv pipenv)
if (DOXYGEN_FOUND)
configure_file(Doxyfile.in Doxyfile)
add_custom_target(docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
if (PipEnv)
configure_file(../docs/conf.py.in docs/conf.py)
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/../docs/index.rst ${CMAKE_CURRENT_BINARY_DIR}/docs/index.rst SYMBOLIC)
get_filename_component(markdown_docs_source ../../../docs ABSOLUTE)
file(CREATE_LINK ${markdown_docs_source} ${CMAKE_CURRENT_BINARY_DIR}/docs/markdown SYMBOLIC)
execute_process(COMMAND ${CMAKE_COMMAND} -E env PIPENV_PIPFILE=${CMAKE_CURRENT_SOURCE_DIR}/../docs/Pipfile ${PipEnv} install)
add_custom_target(docs ALL COMMAND ${CMAKE_COMMAND} -E env PIPENV_PIPFILE=${CMAKE_CURRENT_SOURCE_DIR}/../docs/Pipfile ${PipEnv} run sphinx-build ./docs ./docs/html)
else()
message("Pipenv not found, not building documentation")
endif()
else()
message("Doxygen not found, not building documentation")
endif()

File diff suppressed because it is too large Load diff