diff options
| author | Jérôme Leclercq <[email protected]> | 2023-03-03 16:21:59 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-03 16:21:59 +0100 |
| commit | a5f69f3a6a915471561d9b2382ad5fefe893cac9 (patch) | |
| tree | 98fbf3c82d9c56254b30a23a5239656eda3d5e24 | |
| parent | 9f5e98c4cc256d3321d4d5e23037304e723cdb93 (diff) | |
Fix rust library name (#3452)
Note, this only works for most Rust crates, but some (such as obj-rs) rename their library file.
| -rw-r--r-- | xmake/modules/package/manager/cargo/find_package.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua index d53268333..577fbf253 100644 --- a/xmake/modules/package/manager/cargo/find_package.lua +++ b/xmake/modules/package/manager/cargo/find_package.lua @@ -33,7 +33,7 @@ import("lib.detect.find_file") -- sdl2 -> libsdl2 -- obj-rs -> libobj function _get_libname(name) - return "lib" .. name:split("%-")[1] + return "lib" .. name:gsub("-", "_") end -- get the name set of libraries |
