diff options
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 |
