diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-11-07 22:01:36 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-11-07 22:01:36 -0800 |
commit | cb6a56021282af938f6d82ab0901428eef0b3e96 (patch) | |
tree | c9f481452a7979615298424eac3acd6dc3835102 /libssh2-sys/build.rs | |
parent | 0af4463640cc7067ad729bc80ed0ce66b88b0f45 (diff) | |
download | ssh2-rs-cb6a56021282af938f6d82ab0901428eef0b3e96.zip |
Handle when openssl is in a nonstandard location
Diffstat (limited to 'libssh2-sys/build.rs')
-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 0b0a704..d6d2344 100644 --- a/libssh2-sys/build.rs +++ b/libssh2-sys/build.rs @@ -25,6 +25,14 @@ fn main() { cflags.push_str(" -fPIC"); } + match os::getenv("DEP_OPENSSL_ROOT") { + Some(s) => { + cflags.push_str(format!(" -I{}/include", s).as_slice()); + cflags.push_str(format!(" -L{}/lib", s).as_slice()); + } + None => {} + } + let src = Path::new(os::getenv("CARGO_MANIFEST_DIR").unwrap()); let dst = Path::new(os::getenv("OUT_DIR").unwrap()); |