MACRO(CREA_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED) #-------------------------------------------------------------------------- SET(USE_DOXYGEN ON CACHE BOOL "" FORCE) # Name SET(DOXYGEN_PROJECT_NAME "${NAME}") # Inputs STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}") # Output dirs SET(DOXYGEN_HTML_OUTPUT ".") SET(DOXYGEN_OUTPUT ${PROJECT_BINARY_DIR}/${DOC_RELATIVE_INSTALL_PATH}) IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) # Doc exclude # SET(DOXYGEN_EXCLUDE "CppSQLite3.h;CppSQLite3.cpp") # STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}") # Log file name SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.log") # Predefined symbols STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${PREDEFINED}") #--------------------------------------------------------------------------- # DOT verification IF(DOT) GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH) SET(DOXYGEN_HAVE_DOT "YES") ELSE(DOT) SET(DOXYGEN_DOT_PATH "") SET(DOXYGEN_HAVE_DOT "NO") ENDIF(DOT) #--------------------------------------------------------------------------- # Create file and project CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.txt.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt @ONLY IMMEDIATE ) ADD_CUSTOM_COMMAND( OUTPUT ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html COMMAND ${DOXYGEN} ARGS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt # DEPENDS bbtk bbi ) #IF ( ${${PROJECT_NAME}_DOC} STREQUAL ON) IF ( ${PROJECT_NAME}_DOC STREQUAL ON) CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/GeneralArchitecture/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/GeneralArchitecture_Diagrams/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/wxVtkViewer/wxVtkViewer_classDiagram1_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/wxVtkViewer_classDiagram1_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/wxVtkViewer/wxVtkViewer_classDiagram2_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/wxVtkViewer_classDiagram2_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/manualContour/manualContour_MVC_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/manualContour_MVC_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/manualContour/manualContour_Model_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/manualContour_Model_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/manualContour/manualContour_View_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/manualContour_View_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/manualContour/manualContour_Controler_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/manualContour_Controler_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/manualContour/manualContour_SeqCreateContour_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/manualContour_SeqCreateContour_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/CutModule/CutModuleDiagrams_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/CutModuleDiagrams_HTML/ ) #CREA_CPDIR ( ${CMAKE_CURRENT_SOURCE_DIR}/bouml/GeneralArchitecture/GeneralArchitecture_HTML/ ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/GeneralArchitecture_HTML/ ) ADD_CUSTOM_TARGET(doxygen_${NAME} ALL DEPENDS ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html ) # INSTALL( # DIRECTORY # ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT} # DESTINATION # ${BBTK_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH} # ) # ENDIF ( ${${PROJECT_NAME}_DOC} STREQUAL ON) ENDIF ( ${PROJECT_NAME}_DOC STREQUAL ON) #-------------------------------------------------------------------------- ENDMACRO(CREA_BUILD_DOXYGEN_DOC) FILE(GLOB PAGES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.htm" ) #MESSAGE(STATUS "DOXYGEN HTML PAGES = ${PAGES}") FOREACH(PAGE ${PAGES}) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PAGE} ${PROJECT_BINARY_DIR}/doxygen/${PAGE} IMMEDIATE ) #MESSAGE(STATUS "COPYING ${PAGE} TO ${PROJECT_BINARY_DIR}/doxygen/${PAGE}") ENDFOREACH(PAGE) FILE(GLOB IMAGES_PAGE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.png" "*.jpg") FOREACH(IMAGE_PAGE ${IMAGES_PAGE}) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${IMAGE_PAGE} ${PROJECT_BINARY_DIR}/doxygen/${IMAGE_PAGE} COPYONLY ) ENDFOREACH(IMAGE_PAGE) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/DoxyMainPage.txt.in ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt @ONLY IMMEDIATE ) SET(INPUT ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt ${PROJECT_SOURCE_DIR}/lib/Interface_Icons_NDimensions ${PROJECT_SOURCE_DIR}/lib/Interface_ManagerContour_NDimensions ${PROJECT_SOURCE_DIR}/lib/kernel_ManagerContour_NDimensions ) SET(DOXYGEN_DOC_PREDEFINED USE_WXWIDGETS) CREA_BUILD_DOXYGEN_DOC( ${CMAKE_PROJECT_NAME}_lib "${INPUT}" "doxygen" "${CREA_DEFINITIONS}" ) #MESSAGE("DOX : ${CREA_DEFINITIONS}")