add env VCPKG_INSTALLED_ROOT (#9985)

This commit is contained in:
KAYUII
2024-11-20 19:41:30 +08:00
committed by GitHub
parent 4a49fbe4a6
commit 608d7d55d5
2 changed files with 10 additions and 2 deletions

View File

@@ -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!(
"{}",