From 4c22bd794c0b17f9ff9e276d6a0b9e4f7c8d7e79 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 16 Sep 2026 13:21:04 +0500 Subject: [PATCH] cmake: drop duplicated logic for finding gmp/mpfr It also didn't propagate cgal includes for non-cmake configs. So it means since roughly 0555523, when `CGAL_INCLUDE_DIR` was dropped from global includes, we only supported cmake configs discovery for cgal, so it's a good evidence to drop non-cmake config discovery in general. --- cmake/CMakeLists.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 9d84cc777d..a269f5f0bc 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -611,21 +611,8 @@ endif() if(BUILD_IFCGEOM) # CGAL::CGAL target already has dependencies resolved. - if(WITH_CGAL AND CGAL_DIR) + if(WITH_CGAL) set(CGAL_LIBRARIES CGAL::CGAL) - message(STATUS "Using found CGAL package at '${CGAL_DIR}'") - elseif(WITH_CGAL AND NOT CGAL_DIR) - find_library(libGMP NAMES gmp mpir PATHS ${GMP_LIBRARY_DIR} NO_DEFAULT_PATH) - find_library(libMPFR NAMES mpfr PATHS ${MPFR_LIBRARY_DIR} NO_DEFAULT_PATH) - if(NOT libGMP) - message(FATAL_ERROR "Unable to find GMP library files, aborting") - endif() - if(NOT libMPFR) - message(FATAL_ERROR "Unable to find MPFR library files, aborting") - endif() - - list(APPEND CGAL_LIBRARIES "${libMPFR}") - list(APPEND CGAL_LIBRARIES "${libGMP}") endif() add_subdirectory(../src/ifcgeom ifcgeom)