From 9b0e5b9dce80bbfe1ab0dd816c4313990db3ae72 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 21 Jul 2024 05:30:36 -0500 Subject: [PATCH] Doxygen: set up DoxygenLayout.xml "topics" or "modules" depending on doxygen version --- doc/doxygen/CMakeLists.txt | 19 ++++++++++++++++++- ...DoxygenLayout.xml => DoxygenLayout.xml.in} | 2 +- doc/doxygen/options.dox.in | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) rename doc/doxygen/{DoxygenLayout.xml => DoxygenLayout.xml.in} (99%) diff --git a/doc/doxygen/CMakeLists.txt b/doc/doxygen/CMakeLists.txt index ac62075a00..eca6f2002d 100644 --- a/doc/doxygen/CMakeLists.txt +++ b/doc/doxygen/CMakeLists.txt @@ -114,6 +114,23 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/options.dox ) +# +# Set up DoxygenLayout.xml. Note that the "Modules" tab has been renamed to +# "Topics" in Doxygen 1.9.8 to avoid confusion with C++ modules. +# Unfortunately, this requires us to play a little bit of a configuration +# dance: +# +if(${DOXYGEN_VERSION} VERSION_LESS 1.9.8) + set(_topics_layout_flag "") +else() + set(_topics_layout_flag "") +endif() + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml.in + ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml + ) + # Figure out the last copyright date of any of the deal.II source # files. We will use this then to set the copyright date of the # doxygen-generated HTML files. @@ -319,7 +336,7 @@ add_custom_command( ${CMAKE_CURRENT_BINARY_DIR}/options.dox ${CMAKE_CURRENT_BINARY_DIR}/header.html ${CMAKE_CURRENT_BINARY_DIR}/footer.html - ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml + ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml ${CMAKE_CURRENT_SOURCE_DIR}/scripts/filter.pl ${_doxygen_depend} expand_all_instantiations diff --git a/doc/doxygen/DoxygenLayout.xml b/doc/doxygen/DoxygenLayout.xml.in similarity index 99% rename from doc/doxygen/DoxygenLayout.xml rename to doc/doxygen/DoxygenLayout.xml.in index 715472d84d..4115a79ee9 100644 --- a/doc/doxygen/DoxygenLayout.xml +++ b/doc/doxygen/DoxygenLayout.xml.in @@ -5,7 +5,7 @@ - + @_topics_layout_flag@ diff --git a/doc/doxygen/options.dox.in b/doc/doxygen/options.dox.in index 5c18ab8705..1915c27201 100644 --- a/doc/doxygen/options.dox.in +++ b/doc/doxygen/options.dox.in @@ -126,7 +126,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_SAT = 200 HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/stylesheet.css -LAYOUT_FILE = @CMAKE_CURRENT_SOURCE_DIR@/DoxygenLayout.xml +LAYOUT_FILE = @CMAKE_CURRENT_BINARY_DIR@/DoxygenLayout.xml #--------------------------------------------------------------------------- -- 2.39.5