bin.chen | 1a426d3 | 2021-10-13 10:52:36 +0800 | [diff] [blame] | 1 | # set input and output files |
| 2 | set(DOXYGEN_IN ${SDK_BASE}/doc/Doxyfile) |
| 3 | set(DOXYGEN_OUT ${PROJECT_BINARY_DIR}/Doxyfile) |
| 4 | |
| 5 | # check if Doxygen is installed |
| 6 | find_package(Doxygen) |
| 7 | if (DOXYGEN_FOUND) |
| 8 | |
| 9 | # request to configure the file |
| 10 | configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) |
| 11 | message("Doxygen build started") |
| 12 | |
| 13 | # note the option ALL which allows to build the docs together with the application |
| 14 | add_custom_target( doc_doxygen ALL |
| 15 | COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} |
| 16 | WORKING_DIRECTORY ${PROJECT_BINARY_DIR} |
| 17 | COMMENT "Generating API documentation with Doxygen" |
| 18 | VERBATIM ) |
| 19 | else (DOXYGEN_FOUND) |
| 20 | message("Doxygen need to be installed to generate the doxygen documentation") |
| 21 | endif (DOXYGEN_FOUND) |