diff options
| author | SineStriker <[email protected]> | 2025-04-20 05:07:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-23 11:30:30 +0800 |
| commit | d57cceb19f58b99d5198cea0c32ec306ea22a9fb (patch) | |
| tree | 74f5b5cd3f707887b35fea49e6621dd1ee5b34d7 /xmake/plugins/pack/batchcmds.lua | |
| parent | cef17b4c566a186ba8e9dd3dc52ab44901fed9f1 (diff) | |
Add `set_implibdir` to target APIs
Diffstat (limited to 'xmake/plugins/pack/batchcmds.lua')
| -rw-r--r-- | xmake/plugins/pack/batchcmds.lua | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua index aeb1b842e..70d8e2f5f 100644 --- a/xmake/plugins/pack/batchcmds.lua +++ b/xmake/plugins/pack/batchcmds.lua @@ -303,13 +303,10 @@ function _on_target_installcmd_shared(target, batchcmds_, opt) -- install *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/714 - if target:is_plat("windows", "mingw") and target:is_shared() then - local targetfile = target:targetfile() - local targetfile_lib = path.join(target:implibdir(), path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib")) - if os.isfile(targetfile_lib) then - batchcmds_:mkdir(libdir) - batchcmds_:cp(targetfile_lib, path.join(libdir, path.filename(targetfile_lib))) - end + local target_implib = target:implibfile() + if target_implib and os.isfile(target_implib) then + batchcmds_:mkdir(libdir) + batchcmds_:cp(target_implib, path.join(libdir, path.filename(target_implib))) end _install_target_headers(target, batchcmds_, opt) |
