3 MACRO(BBTK_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED)
5 #--------------------------------------------------------------------------
6 SET(USE_DOXYGEN ON CACHE BOOL "" FORCE)
9 SET(DOXYGEN_PROJECT_NAME "${NAME}")
12 STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}")
15 SET(DOXYGEN_HTML_OUTPUT ".")
16 SET(DOXYGEN_OUTPUT ${BBTK_DOXYGEN_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH})
17 IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
18 FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
19 ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
22 SET(DOXYGEN_EXCLUDE "")
23 STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
26 SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.log")
29 STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${PREDEFINED}")
31 #---------------------------------------------------------------------------
34 GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
35 SET(DOXYGEN_HAVE_DOT "YES")
37 SET(DOXYGEN_DOT_PATH "")
38 SET(DOXYGEN_HAVE_DOT "NO")
41 #---------------------------------------------------------------------------
42 # Create file and project
44 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.txt
45 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
51 OUTPUT ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
55 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
59 ADD_CUSTOM_TARGET(doxygen ALL
60 DEPENDS ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
65 ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}
67 ${BBTK_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
69 #--------------------------------------------------------------------------
71 ENDMACRO(BBTK_BUILD_DOXYGEN_DOC)