diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 9c396e25cf5..6f6b2e4056c 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2851,12 +2851,15 @@ function target.linkname(filename, opt) linkname, count = filename:gsub(target.filename("__pattern__", "static", {plat = "windows"}):gsub("%.", "%%."):gsub("__pattern__", "(.+)") .. "$", "%1") end if count > 0 and linkname then + print("linkname", linkname) return linkname end -- for custom shared libraries name, xxx.so, xxx.dylib if not filename:startswith("lib") and (filename:endswith(".so") or filename:endswith(".dylib")) then + print("filename", filename) return filename end + print("nil") end -- new a target instance diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua index 0d5336fe4f1..f8b9a59b965 100644 --- a/xmake/modules/package/manager/xmake/find_package.lua +++ b/xmake/modules/package/manager/xmake/find_package.lua @@ -134,6 +134,7 @@ function _find_package_from_repo(name, opt) local filename = path.filename(file) if not symrefs[filename] then if file:endswith(".so") or file:match(".+%.so%..+$") or file:endswith(".dylib") then + print("xxx", target.linkname(path.filename(file), {plat = opt.plat})) table.insert(links, target.linkname(path.filename(file), {plat = opt.plat})) end end