Move to Doxygen 1.9.8 and later

master
Camilla Löwy ago%!(EXTRA string=1 year)
parent fb10e95f78
commit e3e41ba339
  1. 12
      CMakeLists.txt
  2. 35
      docs/CMakeLists.txt
  3. 2
      docs/DoxygenLayout.xml

@ -59,11 +59,6 @@ list(APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules")
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
if (GLFW_BUILD_DOCS)
set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Report backend selection # Report backend selection
#-------------------------------------------------------------------- #--------------------------------------------------------------------
@ -134,7 +129,7 @@ if (GLFW_BUILD_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()
if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS) if (GLFW_BUILD_DOCS)
add_subdirectory(docs) add_subdirectory(docs)
endif() endif()
@ -156,11 +151,6 @@ if (GLFW_INSTALL)
install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc" install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
endif()
# Only generate this target if no higher-level project already has # Only generate this target if no higher-level project already has
if (NOT TARGET uninstall) if (NOT TARGET uninstall)
configure_file(CMake/cmake_uninstall.cmake.in configure_file(CMake/cmake_uninstall.cmake.in

@ -31,16 +31,27 @@ foreach(file IN LISTS source_files)
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"") string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"")
endforeach() endforeach()
configure_file(Doxyfile.in Doxyfile @ONLY) set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
add_custom_command(OUTPUT "html/index.html"
COMMAND "${DOXYGEN_EXECUTABLE}" if (NOT DOXYGEN_FOUND OR DOXYGEN_VERSION VERSION_LESS "1.9.8")
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" message(STATUS "Documentation generation requires Doxygen 1.9.8 or later")
MAIN_DEPENDENCY Doxyfile else()
DEPENDS ${header_paths} ${source_files} ${extra_files} configure_file(Doxyfile.in Doxyfile @ONLY)
COMMENT "Generating HTML documentation" add_custom_command(OUTPUT "html/index.html"
VERBATIM) COMMAND "${DOXYGEN_EXECUTABLE}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
add_custom_target(docs ALL SOURCES "html/index.html") MAIN_DEPENDENCY Doxyfile
set_target_properties(docs PROPERTIES FOLDER "GLFW3") DEPENDS ${header_paths} ${source_files} ${extra_files}
COMMENT "Generating HTML documentation"
VERBATIM)
add_custom_target(docs ALL SOURCES "html/index.html")
set_target_properties(docs PROPERTIES FOLDER "GLFW3")
if (GLFW_INSTALL)
install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
endif()
endif()

@ -5,7 +5,7 @@
<tab type="mainpage" visible="yes" title="Introduction"/> <tab type="mainpage" visible="yes" title="Introduction"/>
<tab type="user" url="quick_guide.html" title="Tutorial"/> <tab type="user" url="quick_guide.html" title="Tutorial"/>
<tab type="pages" visible="yes" title="Guides" intro=""/> <tab type="pages" visible="yes" title="Guides" intro=""/>
<tab type="modules" visible="yes" title="Reference" intro=""/> <tab type="topics" visible="yes" title="Reference" intro=""/>
<tab type="filelist" visible="yes" title="Files"/> <tab type="filelist" visible="yes" title="Files"/>
</navindex> </navindex>

Loading…
Cancel
Save