diff options
| author | kaoru <[email protected]> | 2024-04-27 23:09:58 +0800 |
|---|---|---|
| committer | kaoru <[email protected]> | 2024-04-27 23:09:58 +0800 |
| commit | fdde80e8bb645dad8ed82643ce09c79370c0f3fa (patch) | |
| tree | 687bee0e719a0132881e4b583e60cac9745f86b9 | |
| parent | a53a82a1e3a2967ff6dfeed6e99fba210e2c30b5 (diff) | |
linkname assignment logic fixed
| -rw-r--r-- | xmake/core/project/target.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index c5cf3a2b1..9007bce67 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2851,8 +2851,9 @@ function target.linkname(filename, opt) linkname, count = filename:gsub(target.filename("__pattern__", "static", {plat = "windows"}):gsub("%.", "%%."):gsub("__pattern__", "(.+)") .. "$", "%1") end -- for custom shared libraries name, xxx.so, xxx.dylib - if filename:endswith(".so") or filename:endswith(".dylib") then - return filename; + if count == 0 and not filename:startswith("lib") then + count = count + 1 + linkname = filename end return count > 0 and linkname or nil |
