diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 3171c5d3b..5b40ed730 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -55,11 +55,21 @@ if(PICO_BUILD_DOCS) set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + if(DOXYGEN_VERSION VERSION_GREATER_EQUAL "1.9.8") + # see https://github.com/doxygen/doxygen/issues/10562 + set(DOXY_API_DOCS_TAB_TYPE "topics") + else() + set(DOXY_API_DOCS_TAB_TYPE "modules") + endif() + set(doxylayout_in ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml.in) + set(doxylayout ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml) + if (PICO_PLATFORM STREQUAL "rp2040") set(PICO_DOXYGEN_TAG "(RP2040)") elseif (PICO_PLATFORM STREQUAL "rp2350-arm-s" OR PICO_PLATFORM STREQUAL "rp2350-riscv") set(PICO_DOXYGEN_TAG "(RP2350)") endif() + configure_file(${doxylayout_in} ${doxylayout} @ONLY) configure_file(${doxyfile_in} ${doxyfile} @ONLY) add_custom_target(docs diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 916877b32..f1e62f1e7 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -17,7 +17,7 @@ FILE_PATTERNS = *.h \ *.md USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/docs/mainpage.md -LAYOUT_FILE = @PROJECT_SOURCE_DIR@/docs/DoxygenLayout.xml +LAYOUT_FILE = @PROJECT_BINARY_DIR@/docs/DoxygenLayout.xml HTML_FOOTER = @PROJECT_SOURCE_DIR@/docs/footer.html HTML_HEADER = @PROJECT_SOURCE_DIR@/docs/header.html @@ -65,4 +65,4 @@ PREDEFINED = __not_in_flash_func(x)= \ DOXYGEN_GENERATION= \ @DOXY_PREDEFINED@ -ENABLED_SECTIONS = @DOXY_ENABLED_SECTIONS@ \ No newline at end of file +ENABLED_SECTIONS = @DOXY_ENABLED_SECTIONS@ diff --git a/docs/DoxygenLayout.xml b/docs/DoxygenLayout.xml.in similarity index 98% rename from docs/DoxygenLayout.xml rename to docs/DoxygenLayout.xml.in index 07c1c980c..34dd66fcd 100644 --- a/docs/DoxygenLayout.xml +++ b/docs/DoxygenLayout.xml.in @@ -3,7 +3,7 @@ - +