From 13bd01d38cc5b7e69bf0fe197267f4765b598a90 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 15 Oct 2019 09:16:26 +0200 Subject: [PATCH] Fix when CGAL_Qt5 is not available --- .../cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index c5a7fc5b4ec..18d7f418ce7 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -70,7 +70,9 @@ function(create_single_source_cgal_program firstfile ) target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) foreach(comp ${CGAL_REQUESTED_COMPONENTS}) - target_link_libraries(${exe_name} PRIVATE CGAL::CGAL_${comp}) + 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})