diff options
| author | ruki <[email protected]> | 2024-05-31 22:25:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-05-31 22:25:17 +0800 |
| commit | 20e1f9bddf7199350f44130c6b0bb4a51e0a8223 (patch) | |
| tree | 75ef8c75ed6a6f17dce1c324ab9e2a7ee4a40bec | |
| parent | 6e957e6a5ac524d86d2b300b8c4249c07608c7ce (diff) | |
add host dir for cargo #5156
| -rw-r--r-- | xmake/modules/package/manager/cargo/find_package.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/package/manager/cargo/install_package.lua | 1 |
2 files changed, 5 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..a589a8d92 100644 --- a/xmake/modules/package/manager/cargo/find_package.lua +++ b/xmake/modules/package/manager/cargo/find_package.lua @@ -161,6 +161,10 @@ function main(name, opt) result.libfiles = libfiles result.frameworkdirs = frameworkdirs and table.unique(frameworkdirs) or nil result.frameworks = frameworks + local hostlibdir = path.join(librarydir, "host") + if os.isdir(hostlibdir) then + result.linkdirs = hostlibdir + end result.version = opt.require_version end return result diff --git a/xmake/modules/package/manager/cargo/install_package.lua b/xmake/modules/package/manager/cargo/install_package.lua index 97fd1a07e..61bd6257c 100644 --- a/xmake/modules/package/manager/cargo/install_package.lua +++ b/xmake/modules/package/manager/cargo/install_package.lua @@ -169,6 +169,7 @@ target = "%s" os.tryrm(path.join(installdir, "lib")) if target then os.vcp(path.join(sourcedir, "target", target, opt.mode == "debug" and "debug" or "release", "deps"), path.join(installdir, "lib")) + os.vcp(path.join(sourcedir, "target", opt.mode == "debug" and "debug" or "release", "deps"), path.join(installdir, "lib", "host")) else os.vcp(path.join(sourcedir, "target", opt.mode == "debug" and "debug" or "release", "deps"), path.join(installdir, "lib")) end |
