diff options
| author | Akaps316 <[email protected]> | 2026-04-03 21:17:05 +0530 |
|---|---|---|
| committer | Akaps316 <[email protected]> | 2026-04-03 21:17:05 +0530 |
| commit | 482b81ae5d4dc0bca6d2869c94237b48a55a2cfa (patch) | |
| tree | 57d5ac4e114f091c09acf1c5893cdb305e19ca56 /tests/projects/objc/macapp_duplicate_rpath/src | |
| parent | 39fd35ea9d5d14079e4669b85423d488c9097cd4 (diff) | |
fix(xcode.application): avoid duplicate bundle rpath insertion
Only add the macOS app bundle framework rpath if it is missing from the copied app binary.
This avoids install_name_tool failing when the target already links with @executable_path/../Frameworks, for example via add_rpathdirs().
Add a regression test covering a macOS app target that already carries the bundle rpath before xcode.application generates the app bundle.
Diffstat (limited to 'tests/projects/objc/macapp_duplicate_rpath/src')
| -rw-r--r-- | tests/projects/objc/macapp_duplicate_rpath/src/Info.plist | 18 | ||||
| -rw-r--r-- | tests/projects/objc/macapp_duplicate_rpath/src/main.m | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist b/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist new file mode 100644 index 000000000..e20952d73 --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleExecutable</key> + <string>demo</string> + <key>CFBundleIdentifier</key> + <string>io.xmake.demo.duprpath</string> + <key>CFBundleName</key> + <string>demo</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> +</dict> +</plist> diff --git a/tests/projects/objc/macapp_duplicate_rpath/src/main.m b/tests/projects/objc/macapp_duplicate_rpath/src/main.m new file mode 100644 index 000000000..f481d2909 --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/src/main.m @@ -0,0 +1,5 @@ +#import <AppKit/AppKit.h> + +int main(void) { + return 0; +} |
