From e1590a09bb6fb17bc25b35d871e9eaec8f894050 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 17 Jul 2024 22:55:38 +0800 Subject: fix rpath --- xmake/modules/utils/binary/rpath.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/modules/utils/binary') 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 -- cgit v1.3.1