diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d78af3..6fbd52d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,4 +143,28 @@ if (DOXYGEN_FOUND) qore_wrap_dox(QORE_DOX_SRC ${QORE_DOX_TMPL_SRC}) add_custom_target(QORE_MOD_DOX_FILES DEPENDS ${QORE_DOX_SRC}) add_dependencies(docs-module QORE_MOD_DOX_FILES) + + # Two-phase doc build: the initial pass (docs-module) generates cairo.tag with empty + # TAGFILES. User module docs (docs-CairoDataProvider) are then built using cairo.tag, + # generating their own tag files. The final pass (docs-module-final) rebuilds the binary + # module docs with user module tag files in TAGFILES, enabling @ref cross-references + # from the mainpage into user module symbols. + + # Suppress unresolved cross-reference warnings in the initial pass + file(APPEND ${CMAKE_BINARY_DIR}/Doxyfile "\n# Suppress warnings for initial pass (no user module TAGFILES available)\nWARN_IF_DOC_ERROR = NO\n") + + # Create final-pass Doxyfile from the binary module's Doxyfile with user module tag files + file(COPY_FILE ${CMAKE_BINARY_DIR}/Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile.final) + file(APPEND ${CMAKE_BINARY_DIR}/Doxyfile.final + "\n# Final pass: enable user module cross-references and re-enable doc error warnings\nTAGFILES = ${CMAKE_BINARY_DIR}/CairoDataProvider.tag=../CairoDataProvider/html\nWARN_IF_DOC_ERROR = YES\n") + + add_custom_target(docs-module-final + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile.final + COMMAND ${QORE_DOCS_ENV} ${QORE_QDX_COMMAND} --post ${CMAKE_BINARY_DIR}/docs/${module_name}/html ${CMAKE_BINARY_DIR}/docs/${module_name}/html/search + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen (final pass with user module cross-references)" + VERBATIM + ) + add_dependencies(docs-module-final docs-CairoDataProvider) + add_dependencies(docs docs-module-final) endif() diff --git a/docs/footer_template.html b/docs/footer_template.html new file mode 100644 index 0000000..afbabdb --- /dev/null +++ b/docs/footer_template.html @@ -0,0 +1,8 @@ + + +
+