2013-10-09 19:35:35 +00:00
|
|
|
|
2019-05-20 17:02:08 +00:00
|
|
|
# NOTE: The order of this list determines the order of items in the Guides
|
|
|
|
# (i.e. Pages) list in the generated documentation
|
2021-08-25 11:12:14 +00:00
|
|
|
set(source_files
|
2024-02-13 19:20:56 +00:00
|
|
|
main.md
|
|
|
|
news.md
|
|
|
|
quick.md
|
|
|
|
moving.md
|
|
|
|
compile.md
|
|
|
|
build.md
|
|
|
|
intro.md
|
|
|
|
context.md
|
|
|
|
monitor.md
|
|
|
|
window.md
|
|
|
|
input.md
|
|
|
|
vulkan.md
|
|
|
|
compat.md
|
|
|
|
internal.md)
|
2021-08-25 11:12:14 +00:00
|
|
|
|
2021-08-26 15:41:20 +00:00
|
|
|
set(extra_files DoxygenLayout.xml header.html footer.html extra.css spaces.svg)
|
2021-08-25 11:12:14 +00:00
|
|
|
|
|
|
|
set(header_paths
|
|
|
|
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h"
|
|
|
|
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h")
|
2016-02-24 09:23:06 +00:00
|
|
|
|
2019-05-20 17:02:08 +00:00
|
|
|
# Format the source list into a Doxyfile INPUT value that Doxygen can parse
|
2021-08-25 11:12:14 +00:00
|
|
|
foreach(path IN LISTS header_paths)
|
|
|
|
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${path}\"")
|
|
|
|
endforeach()
|
|
|
|
foreach(file IN LISTS source_files)
|
|
|
|
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"")
|
2016-02-24 09:23:06 +00:00
|
|
|
endforeach()
|
|
|
|
|
2024-02-14 17:11:28 +00:00
|
|
|
set(DOXYGEN_SKIP_DOT TRUE)
|
|
|
|
find_package(Doxygen)
|
|
|
|
|
|
|
|
if (NOT DOXYGEN_FOUND OR DOXYGEN_VERSION VERSION_LESS "1.9.8")
|
|
|
|
message(STATUS "Documentation generation requires Doxygen 1.9.8 or later")
|
|
|
|
else()
|
|
|
|
configure_file(Doxyfile.in Doxyfile @ONLY)
|
|
|
|
add_custom_command(OUTPUT "html/index.html"
|
|
|
|
COMMAND "${DOXYGEN_EXECUTABLE}"
|
|
|
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
|
|
|
MAIN_DEPENDENCY Doxyfile
|
|
|
|
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()
|
2020-02-10 16:44:34 +00:00
|
|
|
|