mirror of https://github.com/CGAL/cgal
Merge pull request #4280 from lrineau/CGAL-fix_CGAL_CreateSingleSourceCGALProgram-GF
Fix CGAL_CreateSingleSourceCGALProgram for CGAL_Core and others components
This commit is contained in:
commit
be0c21cfa4
|
|
@ -69,6 +69,11 @@ function(create_single_source_cgal_program firstfile )
|
|||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
||||
|
||||
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL)
|
||||
foreach(comp ${CGAL_REQUESTED_COMPONENTS})
|
||||
if(TARGET CGAL::CGAL_${comp})
|
||||
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL_${comp})
|
||||
endif()
|
||||
endforeach()
|
||||
if(CGAL_3RD_PARTY_LIBRARIES)
|
||||
target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES})
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -468,11 +468,10 @@ EOF
|
|||
echo
|
||||
echo "# Link the executable to CGAL and third-party libraries"
|
||||
LIBS=""
|
||||
if [ "$qt4" = "y" ]; then
|
||||
LIBS="\${QT_LIBRARIES}"
|
||||
fi
|
||||
LIBS=$LIBS" \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES}"
|
||||
echo "target_link_libraries(${target_name} $LIBS )"
|
||||
for comp in ${CGAL_COMPONENTS}; do
|
||||
LIBS=$LIBS" CGAL::CGAL_${comp}"
|
||||
done
|
||||
echo "target_link_libraries(${target_name} PRIVATE CGAL::CGAL${LIBS} )"
|
||||
|
||||
fi # single source or all files #===========================================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue