summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-27 23:33:21 +0800
committerGitHub <[email protected]>2022-03-27 23:33:21 +0800
commit4905f769cc153c7a1ddcb4f23f71805cfc01503b (patch)
tree2cb9fa967dd933109bfadeb5225a34c90b104941
parent0fcbe01f3875c57e8f1f7913e29313b016b9c97f (diff)
parent0c642290755e5aee9560c83b14c386f047805890 (diff)
Merge pull request #2212 from SirLynix/patch-10
fix cargo.find_package with package containing "-"
-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 7fd151d5c..fa7105be5 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -32,6 +32,10 @@ import("lib.detect.find_file")
-- @param opt the options, e.g. {verbose = true, require_version = "1.12.x")
--
function main(name, opt)
+
+ -- Rust packages like actix-web will produce a file named actix_web-<...>
+ name = name:gsub("-", "_")
+
local frameworkdirs
local frameworks
local librarydir = path.join(opt.installdir, "lib")