Apologies if this has been covered, but I'm only seeing occasional references to doxygen in the archives.<br><br>Is there any built-in mechanism for some kind of "make doc" to invoke building documentation through doxygen, or does it require ADD_CUSTOM_TARGET?<br>
<br>Presuming there isn't, I have several library directories beneath the top source directory, each of which contains it's own doxygen config file. I'd like the flexibility of building within just those libraries individually (i.e. run cmake on ./src/lib1/, and make doc to use ./src/lib1/DOXYGEN_CONFIG_FILE), or building all at once with the top level cmakelists (i.e. run cmake on ./src, and make doc to build all the individual library docs.) <br>
<br>in ./src/lib1/cmakelists.txt I have:<br><br>if(DOXYGEN_EXECUTABLE AND UNIX)<br> IF(EXISTS ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE})<br> message( "***** Doxygen config file found *****" )<br> SET(DOXYFILE_FOUND true)<br>
ADD_CUSTOM_TARGET( doc ${DOXYGEN_EXECUTABLE}<br> "${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE}" )<br> install(DIRECTORY ${CMAKE_SOURCE_DIR}/doc/ DESTINATION ${docdir}/html)<br> ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE})<br>
endif(DOXYGEN_EXECUTABLE AND UNIX)<br><br><br><br>which works fine for just that one directory, but placing that same section in ./src/lib2,3,4.. gives an error "target doc already defined". I'd rather not have a custom doc target (make doc_lib1, make doc_lib2...) for each library. So is there any facility to do something like "if( exists custom_target doc ) then append( command to doxy the next library)"?<br>
<br>Thanks in advance!<br>