diff options
Diffstat (limited to 'libssh2-sys')
-rw-r--r-- | libssh2-sys/build.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs index 1a406a3..5ddc70c 100644 --- a/libssh2-sys/build.rs +++ b/libssh2-sys/build.rs @@ -122,6 +122,10 @@ fn main() { cfg.define("LIBSSH2_HAVE_ZLIB", None); if let Some(path) = env::var_os("DEP_Z_INCLUDE") { cfg.include(path); + } else if let Ok(lib) = pkg_config::find_library("zlib") { + for path in &lib.include_paths { + cfg.include(path); + } } if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") { @@ -132,6 +136,10 @@ fn main() { } } } + } else if let Ok(lib) = pkg_config::find_library("openssl") { + for path in &lib.include_paths { + cfg.include(path); + } } let libssh2h = fs::read_to_string("libssh2/include/libssh2.h").unwrap(); |