diff options
| author | ruki <[email protected]> | 2024-07-17 22:35:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-07-17 22:35:58 +0800 |
| commit | 168053862fba19e9db24ad9d1efa1091a084a8d8 (patch) | |
| tree | 73e68d4a37aaae749d95ce2e1e265b2d0c658c8a | |
| parent | df131f5ad79bc1e1da43ef796ce5e398c101059f (diff) | |
fix extraconf
| -rw-r--r-- | xmake/modules/target/action/install/main.lua | 10 | ||||
| -rw-r--r-- | xmake/plugins/pack/batchcmds.lua | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua index f8acc0e81..0b5ac126e 100644 --- a/xmake/modules/target/action/install/main.lua +++ b/xmake/modules/target/action/install/main.lua @@ -148,10 +148,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) - 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()}) + 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()}) + end end end end diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua index 767f86d75..c41efb89d 100644 --- a/xmake/plugins/pack/batchcmds.lua +++ b/xmake/plugins/pack/batchcmds.lua @@ -116,10 +116,12 @@ function _update_target_install_rpath(target, batchcmds_, opt) for idx, rpathdirs in ipairs(result) do local source = sources[idx] local extraconf = target:extraconf_from("rpathdirs", source) - for _, rpathdir in ipairs(rpathdirs) do - local extra = extraconf[rpathdir] - if extra and extra.installonly then - batchcmds_:insert_rpath(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) + if extraconf then + for _, rpathdir in ipairs(rpathdirs) do + local extra = extraconf[rpathdir] + if extra and extra.installonly then + batchcmds_:insert_rpath(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()}) + end end end end |
