ScrapExplorer - CMakeLists.txt
Home / ext / glfw / docs Lines: 3 | Size: 1979 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1 2# Because of bugs and limitations in its Markdown support, only fairly recent 3# versions of Doxygen can produce acceptable output 4set(MINIMUM_DOXYGEN_VERSION 1.9.8) 5 6# NOTE: The order of this list determines the order of items in the Guides 7# (i.e. Pages) list in the generated documentation 8set(source_files 9 main.md 10 news.md 11 quick.md 12 moving.md 13 compile.md 14 build.md 15 intro.md 16 context.md 17 monitor.md 18 window.md 19 input.md 20 vulkan.md 21 compat.md 22 internal.md) 23 24set(extra_files DoxygenLayout.xml header.html footer.html extra.css spaces.svg) 25 26set(header_paths 27 "${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h" 28 "${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h") 29 30# Format the source list into a Doxyfile INPUT value that Doxygen can parse 31foreach(path IN LISTS header_paths) 32 string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${path}\"") 33endforeach() 34foreach(file IN LISTS source_files) 35 string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"") 36endforeach() 37 38set(DOXYGEN_SKIP_DOT TRUE) 39find_package(Doxygen ${MINIMUM_DOXYGEN_VERSION} QUIET) 40 41if (NOT DOXYGEN_FOUND) 42 message(STATUS "Documentation generation requires Doxygen ${MINIMUM_DOXYGEN_VERSION} or later") 43else() 44 configure_file(Doxyfile.in Doxyfile @ONLY) 45 add_custom_command(OUTPUT "html/index.html" 46 COMMAND "${DOXYGEN_EXECUTABLE}" 47 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" 48 MAIN_DEPENDENCY Doxyfile 49 DEPENDS ${header_paths} ${source_files} ${extra_files} 50 COMMENT "Generating HTML documentation" 51 VERBATIM) 52 53 add_custom_target(docs ALL SOURCES ${source_files} DEPENDS "html/index.html") 54 set_target_properties(docs PROPERTIES FOLDER "GLFW3") 55 56 if (GLFW_INSTALL) 57 install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html" 58 DESTINATION "${CMAKE_INSTALL_DOCDIR}") 59 endif() 60endif() 61 62[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.