Skip to content

Commit

Permalink
Merge pull request #188 from sfackler/pkg-config-include
Browse files Browse the repository at this point in the history
Also emit DEP_Z_INCLUDE when using pkg-config
  • Loading branch information
Byron authored Mar 21, 2024
2 parents 2ebe75f + be2ddb4 commit fef3990
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 fef3990

Please sign in to comment.