diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-11-09 08:38:22 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-11-09 08:38:22 -0800 |
commit | 81d17a96d9d6abd6a267ecb35ce84dac59f94eb9 (patch) | |
tree | 0d6079a6f64c1dc5a76eeafd1a194d372cfe47fa /libssh2-sys/build.rs | |
parent | 620b5c2e8702fb6986ecb22572899805b50cb4e2 (diff) | |
download | ssh2-rs-81d17a96d9d6abd6a267ecb35ce84dac59f94eb9.zip |
Set the DEP_OPENSSL_ROOT var
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r-- | libssh2-sys/build.rs | 4 |
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 |