summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-02 21:37:31 +0800
committerruki <[email protected]>2024-06-02 21:37:31 +0800
commit5e4bbe9d314f62fdd6586ff0c3223145517c6507 (patch)
treeaea96d312e54e6daa4eaaa4e73e709c1f1390fe9 /xmake/modules
parent38c2ebc6fec0c069d6d1af2ae9c19200a404b0f1 (diff)
fix find package for cargo
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/manager/cargo/find_package.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua
index 80eb24603..051bbdc5b 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -148,6 +148,10 @@ function main(name, opt)
for _, libraryfile in ipairs(table.join(libfiles, libfiles_native)) do
local filename = path.filename(libraryfile)
local libraryname = filename:split('-', {plain = true})[1]
+ -- https://github.com/xmake-io/xmake/issues/5156#issuecomment-2143509207
+ if not libraryname:startswith("lib") then
+ libraryname = "lib" .. libraryname
+ end
if names:has(libraryname) then
frameworkdirs = frameworkdirs or {}
frameworks = frameworks or {}