File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,19 @@ function(llama_cpp_python_install_target target)
2626 INSTALL_RPATH "$ORIGIN"
2727 BUILD_WITH_INSTALL_RPATH TRUE
2828 )
29+ if (UNIX )
30+ if (APPLE )
31+ set_target_properties (${target} PROPERTIES
32+ INSTALL_RPATH "@loader_path"
33+ BUILD_WITH_INSTALL_RPATH TRUE
34+ )
35+ else ()
36+ set_target_properties (${target} PROPERTIES
37+ INSTALL_RPATH "$ORIGIN"
38+ BUILD_WITH_INSTALL_RPATH TRUE
39+ )
40+ endif ()
41+ endif ()
2942endfunction ()
3043
3144if (LLAMA_BUILD)
@@ -40,7 +53,6 @@ if (LLAMA_BUILD)
4053 # Add the automatically determined parts of the RPATH
4154 # which point to directories outside the build tree to the install RPATH
4255 set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
43- set (CMAKE_INSTALL_RPATH "$ORIGIN" )
4456 set (CMAKE_SKIP_RPATH FALSE )
4557
4658 # Building llama
You can’t perform that action at this time.
0 commit comments