~aleteoryx/muditaos

ref: sign_test muditaos/cmake/modules/GenDoxygenDoc.cmake -rw-r--r-- 1.1 KiB
a217eeb3 — Dawid Wojtas [BH-2024] Fix lack of alarm directory after updating software 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# check if Doxygen is installed
find_package (Doxygen COMPONENTS dot)
if (DOXYGEN_FOUND)
        # set custom command scope
        unset (_DOC_ALL)
        if (BUILD_DOC_WITH_ALL)
                set (_DOC_ALL ALL)
        endif ()

        # set input and output files
        set (DOXYGEN_IN ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in)
        set (DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile)

        # request to configure the file
        configure_file (${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)

        # add target for doxygen documentation
        add_custom_target(doc ${_DOC_ALL}
                COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
                WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
                COMMENT "Generating API documentation with Doxygen"
                VERBATIM
        )
else ()
        if (BUILD_DOC_WITH_ALL)
                message (SEND_ERROR ${BoldRed} "Could not find doxygen with dot to build code documentation." ${ColourReset})
        else()
                message (WARNING ${BoldYellow} "Install doxygen and graphviz to be able to build code documentation" ${ColourReset})
        endif()
endif ()