From 4c96e62129b03193d7eca92ac408ba3c2a74c69e Mon Sep 17 00:00:00 2001 From: fef Date: Mon, 26 Jul 2021 22:58:51 +0200 Subject: [PATCH] doc: use doxygen-awesome theme --- .gitmodules | 3 +++ CMakeLists.txt | 11 +++++++++++ doc/Doxyfile.in | 2 +- doc/doxygen-awesome.css | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 120000 doc/doxygen-awesome.css diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b495f86 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "contrib/doxygen-awesome-css"] + path = contrib/doxygen-awesome-css + url = https://github.com/jothepro/doxygen-awesome-css.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c58744..b713d26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,17 @@ endif() find_package(Git QUIET) if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") + option(GIT_SUBMODULE "Update git submodules during build" ON) + if(GIT_SUBMODULE) + message(STATUS "Git submodule update") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() + endif() + execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 98f12e2..36fd8cf 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1245,7 +1245,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/doxygen-awesome.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note diff --git a/doc/doxygen-awesome.css b/doc/doxygen-awesome.css new file mode 120000 index 0000000..fcded53 --- /dev/null +++ b/doc/doxygen-awesome.css @@ -0,0 +1 @@ +../contrib/doxygen-awesome-css/doxygen-awesome.css \ No newline at end of file