Skip to content

Commit

Permalink
Also emit DEP_ZLIB_INCLUDE when using pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 21, 2024
1 parent 2ebe75f commit be2ddb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ fn main() {
.print_system_libs(false)
.probe("zlib");
match zlib {
Ok(_) => return,
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(","));
}
}
Err(e) => {
println!("cargo-warning={}", e.to_string())
}
Expand Down

0 comments on commit be2ddb4

Please sign in to comment.