CMakeLists.txt 819 字节
Newer Older
H
Hongze Cheng 已提交
1 2 3 4 5 6
# Generate API documentation
## https://vicrucann.github.io/tutorials/quick-cmake-doxygen/
if(${BUILD_DOCS})
    find_package(Doxygen)
    if (DOXYGEN_FOUND)
        # Build the doc
wafwerar's avatar
wafwerar 已提交
7
        set(DOXYGEN_IN ${TD_SOURCE_DIR}/docs/Doxyfile.in)
H
Hongze Cheng 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
        set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile)

        configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
        message("Doxygen build start")

        add_custom_target(
            tdengine_doxygen ALL
            COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
            COMMENT "Generating API doxumentation with Doxygen"
            VERBATIM
        )
    else(DOXYGEN_FOUND)
        message("Doxygen need to be installed to generate the doxygen documentation")
    endif(DOXYGEN_FOUND)
endif(${BUILD_DOCS})