1
2if (SYST_BUILD_DOC)
3   if (NOT DOXYGEN_FOUND)
4        message(
5            WARNING
6            "SYST_BUILD_DOC variable set, but Doxygen was not found -skipping documentation"
7        )
8   else()
9         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../include/mipi_syst.h.in
10             ${CMAKE_CURRENT_BINARY_DIR}/gensrc/mipi_syst.h @ONLY
11         )
12         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
13             ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY
14         )
15
16         add_custom_target(doc
17             ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
18             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
19             COMMENT "Generating Doxygen manual for ${CMAKE_PROJECT_NAME} in ${CMAKE_CURRENT_BINARY_DIR}"
20             SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${DOXYGEN_IDE_FILES}
21           )
22
23         set_target_properties(doc PROPERTIES
24             FOLDER "Instrumentation Library"
25         )
26        endif()
27endif(SYST_BUILD_DOC)
28