From 4d7b71bbb79694bd0fb92d60f8e2423f09962bc6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 8 Jun 2023 17:32:47 +0200 Subject: [PATCH] Update the patch for Conan 2.0 --- Installation/cmake/modules/CGAL_Eigen3_support.cmake | 11 ++++++++--- Installation/lib/cmake/CGAL/CGALConfig.cmake | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Installation/cmake/modules/CGAL_Eigen3_support.cmake b/Installation/cmake/modules/CGAL_Eigen3_support.cmake index cc0df0fad10..bfcf56c7c2f 100644 --- a/Installation/cmake/modules/CGAL_Eigen3_support.cmake +++ b/Installation/cmake/modules/CGAL_Eigen3_support.cmake @@ -1,9 +1,14 @@ -if(EIGEN3_FOUND AND NOT TARGET CGAL::Eigen3_support) +if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support) if(NOT TARGET Threads::Threads) find_package(Threads REQUIRED) endif() add_library(CGAL::Eigen3_support INTERFACE IMPORTED) set_target_properties(CGAL::Eigen3_support PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_EIGEN3_ENABLED" - INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}") + INTERFACE_COMPILE_DEFINITIONS "CGAL_EIGEN3_ENABLED") + if(TARGET Eigen3::Eigen) + target_link_libraries(CGAL::Eigen3_support INTERFACE Eigen3::Eigen) + else() + set_target_properties(CGAL::Eigen3_support PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}") + endif() endif() diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index fef742fb236..ca091574f77 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -146,9 +146,6 @@ foreach(cgal_lib ${CGAL_LIBRARIES}) set(CGALConfig_all_targets_are_defined FALSE) endif() endforeach() - -list(APPEND CMAKE_MODULE_PATH ${CGAL_MODULES_DIR}) - if(CGALConfig_all_targets_are_defined) return() endif() @@ -159,6 +156,8 @@ if(NOT CGAL_FOUND) return() endif() +list(APPEND CMAKE_MODULE_PATH ${CGAL_MODULES_DIR}) + include( ${CGAL_MODULES_DIR}/CGAL_SCM.cmake ) CGAL_detect_git(${CGAL_CONFIG_DIR}/../../../..)