Merge branch 'jpenuchot/doxygen-awesome-css' into 'main'

Added Doxygen with Doxygen Awesome CSS

Co-authored-by: Jules Pénuchot <jules@penuchot.com>

See merge request oss/rotgen!49
This commit is contained in:
Jules Pénuchot 2025-12-08 11:23:43 +01:00
commit 6489697c05
2 changed files with 46 additions and 0 deletions

View file

@ -96,3 +96,8 @@ include(${ROTGEN_SOURCE_DIR}/cmake/config/rotgen-install.cmake)
## Setup the library's Tests
##==============================================================================
add_subdirectory(test)
##==============================================================================
## Setup the library's documentation
##==============================================================================
include(${ROTGEN_SOURCE_DIR}/cmake/docs.cmake)

41
cmake/docs.cmake Normal file
View file

@ -0,0 +1,41 @@
##==============================================================================
## 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()