Fix CGAL_CreateSingleSourceCGALProgram for CGAL_Core and others

This commit is contained in:
Laurent Rineau 2019-10-10 12:23:42 +02:00
parent 5be38d3af0
commit ac557caa4a
2 changed files with 7 additions and 5 deletions

View File

@ -69,6 +69,9 @@ function(create_single_source_cgal_program firstfile )
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) target_link_libraries(${exe_name} PRIVATE CGAL::CGAL)
foreach(comp ${CGAL_REQUESTED_COMPONENTS})
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL_${comp})
endforeach()
if(CGAL_3RD_PARTY_LIBRARIES) if(CGAL_3RD_PARTY_LIBRARIES)
target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES}) target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES})
endif() endif()

View File

@ -468,11 +468,10 @@ EOF
echo echo
echo "# Link the executable to CGAL and third-party libraries" echo "# Link the executable to CGAL and third-party libraries"
LIBS="" LIBS=""
if [ "$qt4" = "y" ]; then for comp in ${CGAL_COMPONENTS}; do
LIBS="\${QT_LIBRARIES}" LIBS=$LIBS" CGAL::CGAL_${comp}"
fi done
LIBS=$LIBS" \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES}" echo "target_link_libraries(${target_name} PRIVATE CGAL::CGAL${LIBS} )"
echo "target_link_libraries(${target_name} $LIBS )"
fi # single source or all files #=========================================== fi # single source or all files #===========================================