summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/batchcmds.lua
diff options
context:
space:
mode:
authorSineStriker <[email protected]>2025-04-21 01:24:27 +0800
committerruki <[email protected]>2025-04-23 11:30:30 +0800
commite16400105330feffae48c766eafc743717436ae1 (patch)
treeb6f67c23f4c3d26d9623b2b265797ea4a12cdb57 /xmake/plugins/pack/batchcmds.lua
parent93dda3ce130c3a71a3d8a7bb4776af6e82bcf1c5 (diff)
Add `byproduct` API to target
Diffstat (limited to 'xmake/plugins/pack/batchcmds.lua')
-rw-r--r--xmake/plugins/pack/batchcmds.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua
index 4128a2cd4..ab5a33aa0 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:has_implib() then
- local target_implib = target:artifactfile("lib")
- if os.isfile(target_implib) then
- batchcmds_:mkdir(libdir)
- batchcmds_:cp(target_implib, path.join(libdir, path.filename(target_implib)))
- end
+ local target_implib = target:byproduct("implib")
+ 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)