diff options
| author | ruki <[email protected]> | 2022-08-23 00:55:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-23 00:55:41 +0800 |
| commit | 1a870edea963e755c2e0b6983f0c0c1395ad06e7 (patch) | |
| tree | 999a9a32834f1b0a5d5a10683b7260a19fdbd4b1 /xmake/rules/xcode/framework/xmake.lua | |
| parent | 22097d49e8a8ff60a8535005c3c3e5b713b2bd42 (diff) | |
improve rpath for framework
Diffstat (limited to 'xmake/rules/xcode/framework/xmake.lua')
| -rw-r--r-- | xmake/rules/xcode/framework/xmake.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua index de7d7c93c..438cbe00d 100644 --- a/xmake/rules/xcode/framework/xmake.lua +++ b/xmake/rules/xcode/framework/xmake.lua @@ -105,6 +105,12 @@ rule("xcode.framework") end os.vcp(target:targetfile(), contentsdir) + -- change rpath + local filename = path.filename(target:targetfile()) + local targetfile = path.join(contentsdir, filename) + local rpath = path.relative(contentsdir, path.directory(bundledir)) + os.vrunv("install_name_tool", {"-id", path.join("@rpath", rpath), targetfile}) + -- move header files os.tryrm(headersdir) os.mv(path.join(contentsdir, "Headers.tmp", target:basename()), headersdir) |
