summaryrefslogtreecommitdiff
path: root/libssh2-sys/build.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-06-29 09:58:43 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-06-29 09:58:43 -0700
commit02bbef969f8f5d47c2ab9a1478aaf55211a77bd6 (patch)
tree3f3371a1757a833a93361e9b37d44b936b90051e /libssh2-sys/build.rs
parentafc39c6e7236b87d7ebde21ee4d4743d9437b85f (diff)
downloadssh2-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.rs8
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());