diff options
| author | ruki <[email protected]> | 2024-08-23 00:55:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-08-23 00:55:43 +0800 |
| commit | f3298528cc2d3ae288c8df26bd14aa0b670ef316 (patch) | |
| tree | 0f8b921513c46378231a5d79dbf0b50c64057985 /xmake/modules | |
| parent | 08eac4b65a1e171bd3f2cc22b66923bb4c1933ee (diff) | |
improve remove rpath
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/target/action/install/main.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua index 228cabd1a..257bdcedc 100644 --- a/xmake/modules/target/action/install/main.lua +++ b/xmake/modules/target/action/install/main.lua @@ -163,14 +163,12 @@ function _update_install_rpath(target, opt) for idx, rpathdirs in ipairs(result) do local source = sources[idx] local extraconf = target:extraconf_from("rpathdirs", source) - if extraconf then - for _, rpathdir in ipairs(rpathdirs) do - local extra = extraconf[rpathdir] - if extra and extra.installonly then - rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) - else - rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) - end + for _, rpathdir in ipairs(rpathdirs) do + local extra = extraconf and extraconf[rpathdir] or nil + if extra and extra.installonly then + rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) + else + rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) end end end |
