Skip to content

Commit

Permalink
Set DEP_Z_INCLUDE if zlib from vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev authored Jul 11, 2024
1 parent 50dfd55 commit 95689d7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,17 @@ fn try_vcpkg() -> bool {
.emit_includes(true)
.find_package("zlib")
{
Ok(_) => true,
Ok(zlib) => {
if !zlib.include_paths.is_empty() {
let paths = zlib
.include_paths
.iter()
.map(|s| s.display().to_string())
.collect::<Vec<_>>();
println!("cargo:include={}", paths.join(","));
}
true
}
Err(e) => {
println!("note, vcpkg did not find zlib: {}", e);
false
Expand Down

0 comments on commit 95689d7

Please sign in to comment.