diff options
| author | ruki <[email protected]> | 2026-04-05 17:21:30 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-05 17:21:30 +0800 |
| commit | 4a13e671f0ba99feca8daf4a1706e9bcb4ccfa67 (patch) | |
| tree | 24c57eb099605c9b10e322fdf648f2ba96d4886e /xmake/rules/xcode/application/build.lua | |
| parent | 95e7d1658cb820accdc1bea5c79562331be9baf7 (diff) | |
| parent | 9b189a6f1098e55c4ea6d1928644bed4acf5a412 (diff) | |
Merge pull request #7451 from Akaps316/codex/fix-ios-framework-rpath
fix(xcode.application): use the correct framework rpath for iOS apps
Diffstat (limited to 'xmake/rules/xcode/application/build.lua')
| -rw-r--r-- | xmake/rules/xcode/application/build.lua | 2 |
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 |
