rotgen/cmake/docs.cmake
Jules Pénuchot a7e7fdce34 Added Doxygen with Doxygen Awesome CSS
Co-authored-by: Jules Pénuchot <jules@penuchot.com>

See merge request oss/rotgen!49
2025-12-08 11:23:43 +01:00

41 lines
1.3 KiB
CMake

##==============================================================================
## ROTGEN - Runtime Overlay for Eigen
## Copyright : CODE RECKONS
## SPDX-License-Identifier: BSL-1.0
##==============================================================================
find_package(Doxygen COMPONENTS dot OPTIONAL_COMPONENTS mscgen dia)
if(Doxygen_FOUND)
# Documentation options
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_EXCLUDE_PATTERNS */build/* */test/*)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/README.md)
set(DOXYGEN_EXAMPLE_PATH ${CMAKE_SOURCE_DIR})
set(DOXYGEN_DOT_TRANSPARENT YES)
set(DOXYGEN_IMAGE_PATH ${CMAKE_SOURCE_DIR})
# ============================================================================
# Doxygen Awesome CSS
include(FetchContent)
FetchContent_Declare(
doxygen_awesome_content
GIT_REPOSITORY https://github.com/jothepro/doxygen-awesome-css.git
GIT_TAG v2.4.1
GIT_SHALLOW)
FetchContent_GetProperties(doxygen_awesome_content)
if(NOT doxygen_awesome_content_POPULATED)
FetchContent_Populate(doxygen_awesome_content)
endif()
set(DOXYGEN_HTML_EXTRA_STYLESHEET
${doxygen_awesome_content_SOURCE_DIR}/doxygen-awesome.css)
doxygen_add_docs(docs)
endif()