summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-29 10:33:10 -0500
committerGitHub <noreply@github.com>2017-07-29 10:33:10 -0500
commit7a5636ee3400a3fbe7daeb37e96d91a73a3a90a1 (patch)
tree470f37f63528ac0abc08ff2d4688edacc6362a27
parentedf9d98080ff873f08071d669ee3fdf78b470454 (diff)
parentaeb88ea11c40dca164bc58d2e5bc5b00eee71e9f (diff)
downloadssh2-rs-7a5636ee3400a3fbe7daeb37e96d91a73a3a90a1.zip
Merge pull request #71 from pornel/master
Support Homebrew's OpenSSL
-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")