diff options
| author | ruki <[email protected]> | 2017-08-24 08:58:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-08-24 08:58:12 +0800 |
| commit | 7187dc72fa1909168213283ecd651fed35c1daae (patch) | |
| tree | 88cb1de64ab4665c645a7842a597f8b799f1cc5d | |
| parent | 24ef8913953a7c49fb1216ac086dbe7ca955155f (diff) | |
fix rpathdir bug
| -rw-r--r-- | xmake/core/tool/builder.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 1a4450a4c..34ed1e3b8 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -159,8 +159,15 @@ function builder:_inherit_from_targetdeps(results, target, flagname) elseif flagname == "rpathdirs" and targetkind == "binary" then + -- make rpathdir + local rpathdir = "@loader_path" + local subdir = path.relative(path.directory(dep:targetfile()), path.directory(target:targetfile())) + if subdir and subdir ~= '.' then + rpathdir = path.join(rpathdir, subdir) + end + -- add dependent rpathdirs - table.insert(results, "@loader_path") + table.insert(results, rpathdir) elseif flagname == "includedirs" then |
