From 87ab37e92b860caacd5827a728c3f5328cb4713c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 14 Mar 2024 11:48:12 +0100 Subject: [PATCH] CORE no longer requires GMP so link only if available --- .../cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 17e0dd017385..a1bf37c0286b 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -49,7 +49,9 @@ set_property(GLOBAL PROPERTY CGAL_Core_FOUND TRUE) function(CGAL_setup_CGAL_Core_dependencies target) find_package( Boost 1.70 REQUIRED ) - use_CGAL_GMP_support(CGAL_Core INTERFACE) + if (!CGAL_DISABLE_GMP AND GMP_FOUND) + use_CGAL_GMP_support(CGAL_Core INTERFACE) + endif() target_compile_definitions(${target} INTERFACE CGAL_USE_CORE=1) target_link_libraries( CGAL_Core INTERFACE CGAL::CGAL ) endfunction()