Track dependencies between libraries and examples/demos

With this patch, when CGAL as been configured with WITH_examples and/or
WITH_demos, then the executables of examples and demos depends on the CGAL
libraries. That means if one change a file involved in a CGAL library, and
ask the rebuild of an executable, then the CGAL library will be rebuilt
first.
This commit is contained in:
Laurent Rineau 2011-04-28 13:11:09 +00:00
parent c97205f085
commit 12744ab7ff
1 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,11 @@ if(NOT USE_CGAL_FILE_INCLUDED)
foreach ( CGAL_COMPONENT ${CGAL_REQUESTED_COMPONENTS} )
if(WITH_CGAL_${CGAL_COMPONENT})
add_to_list( CGAL_LIBRARIES ${CGAL_${CGAL_COMPONENT}_LIBRARY} )
if(TARGET CGAL_${CGAL_COMPONENT})
add_to_list( CGAL_LIBRARIES CGAL_${CGAL_COMPONENT} )
else()
add_to_list( CGAL_LIBRARIES ${CGAL_${CGAL_COMPONENT}_LIBRARY} )
endif()
add_to_list( CGAL_3RD_PARTY_LIBRARIES ${CGAL_${CGAL_COMPONENT}_3RD_PARTY_LIBRARIES} )
add_to_list( CGAL_3RD_PARTY_INCLUDE_DIRS ${CGAL_${CGAL_COMPONENT}_3RD_PARTY_INCLUDE_DIRS} )