summaryrefslogtreecommitdiff
path: root/libssh2-sys/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r--libssh2-sys/build.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 904d21d..0b6906e 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -101,7 +101,9 @@ fn register_dep(dep: &str) {
return
}
if let Some(s) = env::var_os(&format!("DEP_{}_INCLUDE", dep)) {
- let path = Path::new(&s).join("../lib/pkgconfig");
+ let root = Path::new(&s).parent().unwrap();
+ env::set_var(&format!("DEP_{}_ROOT", dep), root);
+ let path = root.join("lib/pkgconfig");
if path.exists() {
prepend("PKG_CONFIG_PATH", path);
return