Radek Krejci | 88ad4be | 2020-10-03 12:27:05 +0200 | [diff] [blame^] | 1 | cmake_minimum_required(VERSION 2.8.12) |
| 2 | |
| 3 | # Prepare building doxygen documentation |
| 4 | macro(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() |
| 20 | endmacro() |