perfect, thank you<br><br><div class="gmail_quote">On Wed, Jul 1, 2009 at 11:22 AM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Jul 01, 2009 at 11:03:10AM -0500, Mark Lohry wrote:<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>
> which works fine for just that one directory, but placing that same section<br>
> in ./src/lib2,3,4.. gives an error "target doc already defined". I'd rather<br>
> not have a custom doc target (make doc_lib1, make doc_lib2...) for each<br>
> library. So is there any facility to do something like "if( exists<br>
> custom_target doc ) then append( command to doxy the next library)"?<br>
<br>
</div>Look at if(TARGET ...) and add_custom_command(... APPEND). I'm not sure<br>
the APPEND part will work because there are issues with custom_commands<br>
across multiple directories (I don't remember the details, but the<br>
archives do).<br>
<font color="#888888"><br>
tyler<br>
</font></blockquote></div><br>