From dcb2ec4bf5e51f55647e4594fc9820b2a2a30d72 Mon Sep 17 00:00:00 2001 From: Alexander Wittig Date: Sat, 22 Mar 2025 11:09:32 +0000 Subject: [PATCH] Fix MacOS rpath handling --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 547a786..e5be4d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,9 @@ if(WIN32) elseif(APPLE) cmake_policy(SET CMP0042 NEW) cmake_policy(SET CMP0068 NEW) - set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) - set(CMAKE_INSTALL_NAME_DIR "@loader_path") + # build libraries use full hard-coded binary path, install libraries replace it by @rpath + set(CMAKE_MACOSX_RPATH OFF) + set(CMAKE_INSTALL_NAME_DIR "@rpath") endif(WIN32)