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