diff options
Diffstat (limited to 'xmake/rules/xcode/framework/xmake.lua')
| -rw-r--r-- | xmake/rules/xcode/framework/xmake.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua index 7baae6412..73370e4e2 100644 --- a/xmake/rules/xcode/framework/xmake.lua +++ b/xmake/rules/xcode/framework/xmake.lua @@ -105,12 +105,14 @@ rule("xcode.framework") end os.vcp(target:targetfile(), contentsdir) - -- change rpath - -- @see https://github.com/xmake-io/xmake/issues/2679#issuecomment-1221839215 - 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, filename), targetfile}) + if target:is_shared() then + -- change rpath + -- @see https://github.com/xmake-io/xmake/issues/2679#issuecomment-1221839215 + 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, filename), targetfile}) + end -- move header files os.tryrm(headersdir) |
