From 274fdfd6b75d5b2ce36246faf1ca1c5a4ebbb4f9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 22 Jan 2025 22:39:42 +0100 Subject: [PATCH] Fix CMake logic --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab80858d1..c3a68f4da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -754,13 +754,15 @@ if(UNIX AND EXISTS "/usr/lib64") endif() if(NOT BOOST_ROOT) # Workaround for Macports - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND (${DETECT_MACPORTS} EQUAL 0)) - if(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.81") - set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.81") - elseif(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.76") - set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.76") - elseif(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.71") - set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.71") + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + if(${DETECT_MACPORTS} EQUAL 0) + if(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.81") + set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.81") + elseif(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.76") + set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.76") + elseif(EXISTS "${MACPORTS_PREFIX}/libexec/boost/1.71") + set(BOOST_ROOT "${MACPORTS_PREFIX}/libexec/boost/1.71") + endif() endif() endif() endif()