From 5dd3516b118324fe20d8ca867e8e6fb52106eca4 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 17 Dec 2024 16:25:08 -0500 Subject: [PATCH] macos rpath --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f5da046f..030de959a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,11 @@ message("Python site-packages directory: ${Python_SITELIB}") if(DEFINED PY_INSTALL) # Note the following setting is only for pyenv and not for conda # TODO: Add support for conda - set(SCIPY_OPENBLAS32_RUNTIME_LIB_PATH "$ORIGIN/../scipy_openblas32/lib") + if(APPLE) + set(SCIPY_OPENBLAS32_RUNTIME_LIB_PATH "@loader_path/../scipy_openblas32/lib") + else() + set(SCIPY_OPENBLAS32_RUNTIME_LIB_PATH "$ORIGIN/../scipy_openblas32/lib") + endif() else() include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSCIPY_OPENBLAS32.cmake") if(NOT DEFINED SCIPY_OPENBLAS32_LIB_PATH AND NOT EXISTS ${SCIPY_OPENBLAS32_LIB_PATH})