From a0bfaee9ebed49fb65c93d7fb00a0c24c1898841 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 10 May 2019 17:31:17 +0200 Subject: [PATCH] Consider CGAL as an imported target --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index c2b0aed549d..08d757aad7f 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -116,7 +116,11 @@ include(CGAL_setup_target_dependencies) foreach(cgal_lib ${CGAL_LIBRARIES}) set(WITH_${cgal_lib} TRUE) if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) - add_library(${cgal_lib} INTERFACE) + if(CGAL_BUILDING_LIBS) + add_library(${cgal_lib} INTERFACE) + else() + add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) + endif() if(NOT TARGET CGAL::${cgal_lib}) add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) endif()