Skip to content

Commit

Permalink
Treat empty OPENSSL_LIBS as no libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Jan 24, 2021
1 parent 62afbbe commit 9e29287
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openssl-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ fn main() {

let libs_env = env("OPENSSL_LIBS");
let libs = match libs_env.as_ref().and_then(|s| s.to_str()) {
Some(ref v) => v.split(':').collect(),
Some(ref v) => {
if v.is_empty() {
vec![]
} else {
v.split(':').collect()
}
}
None => match version {
Version::Openssl10x if target.contains("windows") => vec!["ssleay32", "libeay32"],
Version::Openssl11x if target.contains("windows-msvc") => vec!["libssl", "libcrypto"],
Expand Down

0 comments on commit 9e29287

Please sign in to comment.