blob: 18000725499cef6881a7bf7f6d881b1e5969ca67 [file] [log] [blame]
Radek Krejci88ad4be2020-10-03 12:27:05 +02001# Prepare building doxygen documentation
2macro(LIBYANG_DOC)
3 find_package(Doxygen)
4 if(DOXYGEN_FOUND)
5 find_program(DOT_PATH dot PATH_SUFFIXES graphviz2.38/bin graphviz/bin)
6 if(DOT_PATH)
7 set(HAVE_DOT "YES")
8 else()
9 set(HAVE_DOT "NO")
10 message(AUTHOR_WARNING "Doxygen: to generate UML diagrams please install graphviz")
11 endif()
12 add_custom_target(doc
13 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
14 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
Radek Krejci64b43042021-04-26 09:27:43 +020015 string(REPLACE ";" " " DOXY_HEADERS "${headers};${PROJECT_BINARY_DIR}/src/version.h;${type_plugins}")
Radek Krejci88ad4be2020-10-03 12:27:05 +020016 configure_file(Doxyfile.in Doxyfile)
17 endif()
18endmacro()