Radek Krejci | 88ad4be | 2020-10-03 12:27:05 +0200 | [diff] [blame] | 1 | # Prepare building doxygen documentation |
| 2 | macro(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 Krejci | 64b4304 | 2021-04-26 09:27:43 +0200 | [diff] [blame^] | 15 | string(REPLACE ";" " " DOXY_HEADERS "${headers};${PROJECT_BINARY_DIR}/src/version.h;${type_plugins}") |
Radek Krejci | 88ad4be | 2020-10-03 12:27:05 +0200 | [diff] [blame] | 16 | configure_file(Doxyfile.in Doxyfile) |
| 17 | endif() |
| 18 | endmacro() |