From 5f750d5bb6c82043d2ee509e67d9435fd2dc2f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 1 Nov 2021 11:16:40 +0100 Subject: [PATCH] do not define several times --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 9d9049f2323..de6b2af3220 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -167,10 +167,12 @@ endforeach() # # Define a specific target for basic viewer # -add_library(CGAL::CGAL_Basic_viewer INTERFACE IMPORTED) - set_target_properties(CGAL::CGAL_Basic_viewer PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER;QT_NO_KEYWORDS" - INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt5) +if (NOT TARGET CGAL::CGAL_Basic_viewer) + add_library(CGAL::CGAL_Basic_viewer INTERFACE IMPORTED) + set_target_properties(CGAL::CGAL_Basic_viewer PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER;QT_NO_KEYWORDS" + INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt5) +endif() include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake)