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)
26
26
INSTALL_RPATH "$ORIGIN"
27
27
BUILD_WITH_INSTALL_RPATH TRUE
28
28
)
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 ()
29
42
endfunction ()
30
43
31
44
if (LLAMA_BUILD )
@@ -40,7 +53,6 @@ if (LLAMA_BUILD)
40
53
# Add the automatically determined parts of the RPATH
41
54
# which point to directories outside the build tree to the install RPATH
42
55
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
43
- set (CMAKE_INSTALL_RPATH "$ORIGIN" )
44
56
set (CMAKE_SKIP_RPATH FALSE )
45
57
46
58
# Building llama
You can’t perform that action at this time.
0 commit comments