diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-06-29 09:58:43 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-06-29 09:58:43 -0700 |
commit | 02bbef969f8f5d47c2ab9a1478aaf55211a77bd6 (patch) | |
tree | 3f3371a1757a833a93361e9b37d44b936b90051e /libssh2-sys/build.rs | |
parent | afc39c6e7236b87d7ebde21ee4d4743d9437b85f (diff) | |
download | ssh2-rs-02bbef969f8f5d47c2ab9a1478aaf55211a77bd6.zip |
Print out include paths when found through pkg-config
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r-- | libssh2-sys/build.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs index 60d3931..bf13104 100644 --- a/libssh2-sys/build.rs +++ b/libssh2-sys/build.rs @@ -35,9 +35,11 @@ fn main() { return } - match pkg_config::find_library("libssh2") { - Ok(..) => return, - Err(..) => {} + if let Ok(lib) = pkg_config::find_library("libssh2") { + for path in &lib.include_paths { + println!("cargo:include={}", path.display()); + } + return } let mut cflags = env::var("CFLAGS").unwrap_or(String::new()); |