diff options
Diffstat (limited to 'xmake/core/project/target.lua')
| -rw-r--r-- | xmake/core/project/target.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 9007bce67..9c396e25c 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2850,13 +2850,13 @@ function target.linkname(filename, opt) if count == 0 and opt.plat == "mingw" then linkname, count = filename:gsub(target.filename("__pattern__", "static", {plat = "windows"}):gsub("%.", "%%."):gsub("__pattern__", "(.+)") .. "$", "%1") end + if count > 0 and linkname then + return linkname + end -- for custom shared libraries name, xxx.so, xxx.dylib - if count == 0 and not filename:startswith("lib") then - count = count + 1 - linkname = filename + if not filename:startswith("lib") and (filename:endswith(".so") or filename:endswith(".dylib")) then + return filename end - - return count > 0 and linkname or nil end -- new a target instance |
