3 MACRO(USER_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 "${${PROJECT_NAME}_DOXYGEN_BUILD_PATH}")
17 STRING(REGEX REPLACE " " "~" DOXYGEN_OUTPUT "${DOXYGEN_OUTPUT}")
20 IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
21 FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
22 ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
25 SET(DOXYGEN_EXCLUDE "")
26 STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
29 SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.log")
32 STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${PREDEFINED}")
34 #---------------------------------------------------------------------------
37 GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
38 SET(DOXYGEN_HAVE_DOT "YES")
40 SET(DOXYGEN_DOT_PATH "")
41 SET(DOXYGEN_HAVE_DOT "NO")
44 #---------------------------------------------------------------------------
45 # Create file and project
47 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.txt.in
48 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
54 OUTPUT ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
58 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
62 ADD_CUSTOM_TARGET(doxygen_${NAME} ALL
63 DEPENDS ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
68 ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}
70 ${${PROJECT_NAME}_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
72 #--------------------------------------------------------------------------
73 #message("user build doxygen , doxygen output = ${DOXYGEN_OUTPUT}")
74 ENDMACRO(USER_BUILD_DOXYGEN_DOC)