We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6926dc8 commit e96c315Copy full SHA for e96c315
xmake/core/project/target.lua
@@ -2947,8 +2947,13 @@ function target.linkname(filename, opt)
2947
if count > 0 and linkname then
2948
return linkname
2949
end
2950
- -- for custom shared libraries name, xxx.so, xxx.dylib
2951
- if not filename:startswith("lib") and (filename:endswith(".so") or filename:endswith(".dylib")) then
+ -- fallback to the generic unix library name, libxxx.a, libxxx.so, ..
+ if filename:startswith("lib") then
2952
+ if filename:endswith(".a") or filename:endswith(".so") then
2953
+ return path.basename(filename:sub(4))
2954
+ end
2955
+ elseif filename:endswith(".so") or filename:endswith(".dylib") then
2956
+ -- for custom shared libraries name, xxx.so, xxx.dylib
2957
return filename
2958
2959
return nil
0 commit comments