summaryrefslogtreecommitdiff
path: root/xmake/rules/xcode/application/build.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/xcode/application/build.lua')
-rw-r--r--xmake/rules/xcode/application/build.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua
index a393ed76b..d55d71a9c 100644
--- a/xmake/rules/xcode/application/build.lua
+++ b/xmake/rules/xcode/application/build.lua
@@ -50,6 +50,8 @@ function main (target, opt)
-- @see https://github.com/xmake-io/xmake/issues/2679#issuecomment-1221839215
local targetfile = path.join(binarydir, path.filename(target:targetfile()))
try { function () os.vrunv("install_name_tool", {"-delete_rpath", "@loader_path", targetfile}) end }
+ -- macOS uses @executable_path/../Frameworks due to Contents/MacOS/ layout
+ -- iOS/watchOS/tvOS/visionOS use flat bundle layout where frameworks are in the same directory as the executable
local rpath = target:is_plat("macosx") and "@executable_path/../Frameworks" or "@executable_path/Frameworks"
local rpathdirs = rpath_utils.list(targetfile, {plat = target:plat(), arch = target:arch()}) or {}
if not table.contains(rpathdirs, rpath) then