Skip to content

Commit 608d7d5

Browse files
authored
add env VCPKG_INSTALLED_ROOT (rustdesk#9985)
1 parent 4a49fbe commit 608d7d5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ fn install_android_deps() {
6161
let target = format!("{}-android", target_arch);
6262
let vcpkg_root = std::env::var("VCPKG_ROOT").unwrap();
6363
let mut path: std::path::PathBuf = vcpkg_root.into();
64-
path.push("installed");
64+
if let Ok(vcpkg_root) = std::env::var("VCPKG_INSTALLED_ROOT") {
65+
path = vcpkg_root.into();
66+
} else {
67+
path.push("installed");
68+
}
6569
path.push(target);
6670
println!(
6771
"{}",

libs/scrap/build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ fn link_vcpkg(mut path: PathBuf, name: &str) -> PathBuf {
5555
target = target.replace("x64", "x86");
5656
}
5757
println!("cargo:info={}", target);
58-
path.push("installed");
58+
if let Ok(vcpkg_root) = std::env::var("VCPKG_INSTALLED_ROOT") {
59+
path = vcpkg_root.into();
60+
} else {
61+
path.push("installed");
62+
}
5963
path.push(target);
6064
println!(
6165
"{}",

0 commit comments

Comments
 (0)