The CMakeLists.txt file in the src directory is unchanged. The only changes in the root CMakeLists.txt file are as follows:
- We include the UseBreathe.cmake custom module:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")include(UseBreathe)
- We call the add_breathe_doc function. This function is defined in the custom module, and it accepts keyword arguments to set up the combined Doxygen and Sphinx build:
add_breathe_doc( SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/docs BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/_build CACHE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_doctrees HTML_DIR ${CMAKE_CURRENT_BINARY_DIR}/html DOXY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in CONF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/docs/conf.py.in TARGET_NAME ...