blob: ee879d0f272a94ac52ab42eadad3cf8ae0a423da [file] [log] [blame]
Radek Krejci88ad4be2020-10-03 12:27:05 +02001# Prepare building doxygen documentation
Michal Vasko3b62f3b2021-05-25 08:53:38 +02002macro(GEN_DOC INPUT_FILES PROJECT_VERSION PROJECT_DESCRIPTION DOC_LOGO)
Radek Krejci88ad4be2020-10-03 12:27:05 +02003 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()
Michal Vasko3b62f3b2021-05-25 08:53:38 +020012
13 # target doc
Radek Krejci88ad4be2020-10-03 12:27:05 +020014 add_custom_target(doc
15 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
16 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
Michal Vasko3b62f3b2021-05-25 08:53:38 +020017
18 # generate list with spaces as separators
19 string(REPLACE ";" " " DOXY_INPUT "${INPUT_FILES}")
20
21 # make other arguments into variables
22 set(PROJECT_VERSION ${PROJECT_VERSION})
23 set(PROJECT_DESCRIPTION ${PROJECT_DESCRIPTION})
24 set(DOC_LOGO ${DOC_LOGO})
25
Radek Krejci88ad4be2020-10-03 12:27:05 +020026 configure_file(Doxyfile.in Doxyfile)
27 endif()
28endmacro()