Skip to content

Commit

Permalink
Update target.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored Apr 27, 2024
1 parent fdde80e commit fd6bc85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xmake/core/project/target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd6bc85

Please sign in to comment.