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/actions/package/oldpkg/main.lua | |
| parent | cef17b4c566a186ba8e9dd3dc52ab44901fed9f1 (diff) | |
Add `set_implibdir` to target APIs
Diffstat (limited to 'xmake/actions/package/oldpkg/main.lua')
| -rw-r--r-- | xmake/actions/package/oldpkg/main.lua | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/xmake/actions/package/oldpkg/main.lua b/xmake/actions/package/oldpkg/main.lua index 983f187a9..54a560cb9 100644 --- a/xmake/actions/package/oldpkg/main.lua +++ b/xmake/actions/package/oldpkg/main.lua @@ -48,20 +48,9 @@ function _package_library(target) -- copy *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/787 - if target:is_shared() then - if target:is_plat("windows") then - local targetfile = target:targetfile() - local targetfile_lib = path.join(target:implibdir(), path.basename(targetfile) .. ".lib") - if os.isfile(targetfile_lib) then - os.vcp(targetfile_lib, format("%s/%s.pkg/$(plat)/$(arch)/lib/$(mode)/", outputdir, targetname)) - end - elseif target:is_plat("mingw") then - local targetfile = target:targetfile() - local targetfile_lib = path.join(target:implibdir(), path.basename(targetfile) .. ".dll.a") - if os.isfile(targetfile_lib) then - os.vcp(targetfile_lib, format("%s/%s.pkg/$(plat)/$(arch)/lib/$(mode)/", outputdir, targetname)) - end - end + local target_implib = target:implibfile() + if target_implib and os.isfile(target_implib) then + os.vcp(target_implib, format("%s/%s.pkg/$(plat)/$(arch)/lib/$(mode)/", outputdir, targetname)) end -- copy headers |
