blob: f10b8645e40e9cbaf0cafc80e78305b4e7da36e4 [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})
15 string(REPLACE ";" " " DOXY_HEADERS "${headers};${PROJECT_BINARY_DIR}/src/version.h")
16 configure_file(Doxyfile.in Doxyfile)
17 endif()
18endmacro()