diff options
| author | SineStriker <[email protected]> | 2025-04-18 23:29:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-23 11:30:30 +0800 |
| commit | 6551ed38c1250c0c41eada6db14f8601bf3ddb64 (patch) | |
| tree | f8e7525fc8bc74b54f077c82148c0ae79df35d87 /xmake/core/project | |
| parent | a5c510f35e861b0ff71a2af0781359bc881ea3af (diff) | |
Support customizing `implib` path of MinGW/MSVC
Diffstat (limited to 'xmake/core/project')
| -rw-r--r-- | xmake/core/project/target.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 089fd1e3c..411822fcb 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1605,6 +1605,26 @@ function _instance:targetdir() return targetdir end +-- get the imp-lib directory (only on windows) +function _instance:implibdir() + if not ((self:is_plat("windows", "mingw")) and self:is_shared()) then + return nil + end + + local targetdir = self:extraconf("targetdir") or {} + local implibdir = nil + for _, v in pairs(targetdir) do + if type(v) == "table" then + implibdir = v["implibdir"] + end + break + end + if not implibdir then + return self:targetdir() + end + return implibdir +end + -- get the target file name function _instance:filename() |
