On Wed, Jul 01, 2009 at 11:03:10AM -0500, Mark Lohry wrote:
> in ./src/lib1/cmakelists.txt I have:
>
> if(DOXYGEN_EXECUTABLE AND UNIX)
> IF(EXISTS ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE})
> message( "***** Doxygen config file found *****" )
> SET(DOXYFILE_FOUND true)
> ADD_CUSTOM_TARGET( doc ${DOXYGEN_EXECUTABLE}
> "${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE}" )
> install(DIRECTORY ${CMAKE_SOURCE_DIR}/doc/ DESTINATION ${docdir}/html)
> ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE})
> endif(DOXYGEN_EXECUTABLE AND UNIX)
>
>
> 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)"?
Look at if(TARGET ...) and add_custom_command(... APPEND). I'm not sure
the APPEND part will work because there are issues with custom_commands
across multiple directories (I don't remember the details, but the
archives do).
tyler
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake