1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add basic support for generating API documentation using Doxygen

If CMake is run and Doxygen is found, add a make target called "doc",
which builds API documention in doc/html. This target is not included
in the default "all" target, you have to explicitly run "make doc" to
generate the documentation.

If graphviz is installed, in particular, if the "dot" binary is found,
doxygen is configured to generate various kinds of diagrams. Note that
due to this, the first run of doxygen can take a while.
This commit is contained in:
Jürgen Doser 2013-01-30 18:21:32 +01:00 committed by ShadowNinja
parent 8066743a83
commit 83830e8682
3 changed files with 49 additions and 3 deletions

View file

@ -229,3 +229,14 @@ endif()
include(CPack)
# Add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)