summaryrefslogtreecommitdiff
path: root/libssh2-sys
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2017-07-29 12:11:40 +0100
committerKornel <kornel@geekhood.net>2017-07-29 12:11:40 +0100
commitaeb88ea11c40dca164bc58d2e5bc5b00eee71e9f (patch)
tree470f37f63528ac0abc08ff2d4688edacc6362a27 /libssh2-sys
parentedf9d98080ff873f08071d669ee3fdf78b470454 (diff)
downloadssh2-rs-aeb88ea11c40dca164bc58d2e5bc5b00eee71e9f.zip
Support Homebrew's OpenSSL
Diffstat (limited to 'libssh2-sys')
-rw-r--r--libssh2-sys/build.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 0ab9005..b8509e8 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -62,6 +62,11 @@ fn main() {
}
}
+ // Homebrew deprecated OpenSSL and deliberately hides it from cmake, requiring such opt-in
+ if target.contains("darwin") && Path::new("/usr/local/opt/openssl/include/openssl/ssl.h").exists() {
+ cfg.define("OPENSSL_ROOT_DIR", "/usr/local/opt/openssl/");
+ }
+
let dst = cfg.define("BUILD_SHARED_LIBS", "OFF")
.define("ENABLE_ZLIB_COMPRESSION", "ON")
.define("CMAKE_INSTALL_LIBDIR", "lib")