summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-21 23:01:14 +0800
committerruki <[email protected]>2023-09-21 23:01:14 +0800
commit51a80ef7d4b8fd1b2aafdde3a697b327c71fba41 (patch)
treebc2d7011a938d7ba93a4f50c8ee84a567adf8f37
parent18fe125530192566779c797d0e7006aa5c78c550 (diff)
improve cargo find package for linux
-rw-r--r--xmake/modules/package/manager/cargo/find_package.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua
index e4873864d..80eb24603 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -137,8 +137,13 @@ function main(name, opt)
-- @see https://github.com/xmake-io/xmake/issues/4228
local libfiles_native
- if opt.plat == "macosx" then
+ local plat = opt.plat
+ if plat == "macosx" then
libfiles_native = os.files(path.join(librarydir, "*.dylib"))
+ elseif plat == "windows" or plat == "mingw" then
+ libfiles_native = os.files(path.join(librarydir, "*.lib"))
+ else
+ libfiles_native = os.files(path.join(librarydir, "*.so"))
end
for _, libraryfile in ipairs(table.join(libfiles, libfiles_native)) do
local filename = path.filename(libraryfile)