summaryrefslogtreecommitdiff
path: root/xmake/modules/utils
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-17 22:55:38 +0800
committerruki <[email protected]>2024-07-17 22:55:38 +0800
commite1590a09bb6fb17bc25b35d871e9eaec8f894050 (patch)
tree802e14aeae436ebac53d2e595a2f70ef969f7c75 /xmake/modules/utils
parent5f5164528ab628cbd688782b9057e898f9a27cfe (diff)
fix rpath
Diffstat (limited to 'xmake/modules/utils')
-rw-r--r--xmake/modules/utils/binary/rpath.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua
index cdf87d580..674a9edf0 100644
--- a/xmake/modules/utils/binary/rpath.lua
+++ b/xmake/modules/utils/binary/rpath.lua
@@ -26,10 +26,10 @@ function _replace_rpath_vars(rpath, opt)
local plat = opt.plat or os.host()
local arch = opt.arch or os.arch()
if plat == "macosx" or plat == "iphoneos" or plat == "appletvos" or plat == "watchos" then
+ rpath = rpath:gsub("%$ORIGIN", "@loader_path")
+ else
rpath = rpath:gsub("@loader_path", "$ORIGIN")
rpath = rpath:gsub("@executable_path", "$ORIGIN")
- else
- rpath = rpath:gsub("%$ORIGIN", "@loader_path")
end
return rpath
end