blob: a45c7991f754b4f2c9746adae32411066f1ba913 [file] [log] [blame]
yang.lid6fe6242022-01-13 14:44:24 +08001# Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
2
3# SPDX-License-Identifier: MIT
4
bin.chen1a426d32021-10-13 10:52:36 +08005# set input and output files
6set(DOXYGEN_IN ${SDK_BASE}/doc/Doxyfile)
7set(DOXYGEN_OUT ${PROJECT_BINARY_DIR}/Doxyfile)
8
9# check if Doxygen is installed
10find_package(Doxygen)
11if (DOXYGEN_FOUND)
12
13 # request to configure the file
14 configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
15 message("Doxygen build started")
16
17 # note the option ALL which allows to build the docs together with the application
18 add_custom_target( doc_doxygen ALL
19 COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
20 WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
21 COMMENT "Generating API documentation with Doxygen"
22 VERBATIM )
23else (DOXYGEN_FOUND)
24 message("Doxygen need to be installed to generate the doxygen documentation")
25endif (DOXYGEN_FOUND)