summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroblique <psyberbits@gmail.com>2020-03-31 13:28:40 +0300
committerWez Furlong <wez@wezfurlong.org>2020-04-25 11:01:15 -0700
commitb8ac2963654f8a9480e6e20f51de31f9779f478f (patch)
treeb6e0718252ceb10eb0b3ae10c58dd938aa3e0186
parent5c5bf32fe985e8a39e267ac31348764abf1e207c (diff)
downloadssh2-rs-b8ac2963654f8a9480e6e20f51de31f9779f478f.zip
vcpkg: Support openssl 1.1 linkage
-rw-r--r--libssh2-sys/build.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 5ddc70c..861978d 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -189,9 +189,16 @@ fn try_vcpkg() -> bool {
.map(|_| {
// found libssh2 which depends on openssl and zlib
vcpkg::Config::new()
- .lib_name("libeay32")
- .lib_name("ssleay32")
+ .lib_name("libssl")
+ .lib_name("libcrypto")
.probe("openssl")
+ .or_else(|_| {
+ // openssl 1.1 was not found, try openssl 1.0
+ vcpkg::Config::new()
+ .lib_name("libeay32")
+ .lib_name("ssleay32")
+ .probe("openssl")
+ })
.expect(
"configured libssh2 from vcpkg but could not \
find openssl libraries that it depends on",