diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 09:41:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 11:00:43 +0000 |
commit | d0b1bae8c5c70c5d06f3dcecc450a75e7f7cb5af (patch) | |
tree | 7ea7c5e622a5d7c9c989057a1eca8954c4d7fefb /CMakeModules/GenDoc.cmake | |
parent | Initial commit. (diff) | |
download | libyang3-d0b1bae8c5c70c5d06f3dcecc450a75e7f7cb5af.tar.xz libyang3-d0b1bae8c5c70c5d06f3dcecc450a75e7f7cb5af.zip |
Adding upstream version 3.1.0+dfsg.upstream/3.1.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | CMakeModules/GenDoc.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/CMakeModules/GenDoc.cmake b/CMakeModules/GenDoc.cmake new file mode 100644 index 0000000..ee879d0 --- /dev/null +++ b/CMakeModules/GenDoc.cmake @@ -0,0 +1,28 @@ +# Prepare building doxygen documentation +macro(GEN_DOC INPUT_FILES PROJECT_VERSION PROJECT_DESCRIPTION DOC_LOGO) + find_package(Doxygen) + if(DOXYGEN_FOUND) + find_program(DOT_PATH dot PATH_SUFFIXES graphviz2.38/bin graphviz/bin) + if(DOT_PATH) + set(HAVE_DOT "YES") + else() + set(HAVE_DOT "NO") + message(AUTHOR_WARNING "Doxygen: to generate UML diagrams please install graphviz") + endif() + + # target doc + add_custom_target(doc + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + + # generate list with spaces as separators + string(REPLACE ";" " " DOXY_INPUT "${INPUT_FILES}") + + # make other arguments into variables + set(PROJECT_VERSION ${PROJECT_VERSION}) + set(PROJECT_DESCRIPTION ${PROJECT_DESCRIPTION}) + set(DOC_LOGO ${DOC_LOGO}) + + configure_file(Doxyfile.in Doxyfile) + endif() +endmacro() |