summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-11-18 14:59:51 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-11-18 14:59:51 -0800
commit5917d7028773a2d371de16713477561f67e9775a (patch)
treedea1ba5154d0f224d40adf0e27d3585f2511626e
parent3cb227410ed1f454e2884526f66ba48dc8de12f9 (diff)
downloadssh2-rs-5917d7028773a2d371de16713477561f67e9775a.zip
Parse include dir from openssl differently
-rw-r--r--libssh2-sys/build.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 0f8c307..3489a21 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -40,7 +40,13 @@ fn main() {
}
if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") {
- cfg.define("OPENSSL_INCLUDE_DIR", path);
+ if let Some(path) = env::split_paths(&path).next() {
+ if let Some(path) = path.to_str() {
+ if path.len() > 0 {
+ cfg.define("OPENSSL_INCLUDE_DIR", path);
+ }
+ }
+ }
}
let dst = cfg.define("BUILD_SHARED_LIBS", "OFF")