summaryrefslogtreecommitdiff
path: root/libssh2-sys/build.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-10-13 15:59:45 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-10-13 15:59:45 -0700
commit56ce3bde8b208b5f29958f198c5cedbce3144798 (patch)
tree10cb69584ddb58034c594e02d14d0311eb92488b /libssh2-sys/build.rs
parentb5320721a443b6ed45576a19c091a6f59b45504b (diff)
downloadssh2-rs-56ce3bde8b208b5f29958f198c5cedbce3144798.zip
Define OPENSSL_INCLUDE_DIR if available
Helps with nonstandard install locations of openssl
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r--libssh2-sys/build.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 26938c3..0d27a26 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -48,6 +48,10 @@ fn main() {
}
}
+ if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") {
+ cfg.define("OPENSSL_INCLUDE_DIR", path);
+ }
+
let dst = cfg.define("BUILD_SHARED_LIBS", "OFF")
.define("ENABLE_ZLIB_COMPRESSION", "ON")
.define("CMAKE_INSTALL_LIBDIR", "lib")