Skip to content

Commit

Permalink
add env VCPKG_INSTALLED_ROOT (rustdesk#9985)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayuii authored Nov 20, 2024
1 parent 4a49fbe commit 608d7d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ fn install_android_deps() {
let target = format!("{}-android", target_arch);
let vcpkg_root = std::env::var("VCPKG_ROOT").unwrap();
let mut path: std::path::PathBuf = vcpkg_root.into();
path.push("installed");
if let Ok(vcpkg_root) = std::env::var("VCPKG_INSTALLED_ROOT") {
path = vcpkg_root.into();
} else {
path.push("installed");
}
path.push(target);
println!(
"{}",
Expand Down
6 changes: 5 additions & 1 deletion libs/scrap/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ fn link_vcpkg(mut path: PathBuf, name: &str) -> PathBuf {
target = target.replace("x64", "x86");
}
println!("cargo:info={}", target);
path.push("installed");
if let Ok(vcpkg_root) = std::env::var("VCPKG_INSTALLED_ROOT") {
path = vcpkg_root.into();
} else {
path.push("installed");
}
path.push(target);
println!(
"{}",
Expand Down

0 comments on commit 608d7d5

Please sign in to comment.