diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 4a22c918db5638b900fb482abaaf460805d91ea6..9b102fa8dc33bf5379dd73c3d58bf78b3cc0590f 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -27,8 +27,6 @@ bindgen = { version = "0.64.0", optional = true, features = ["experimental"] } cc = "1.0.61" openssl-src = { version = "111", optional = true } pkg-config = "0.3.9" - -[target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2.8" # We don't actually use metadeps for annoying reasons but this is still here for tooling diff --git a/openssl-sys/build/find_normal.rs b/openssl-sys/build/find_normal.rs index 0f45cce11b8f26e1ade274c7e3d7b2c1c0b206da..4d461039c2883fcaf8bb7ca68addb9c3ea0d1d82 100644 --- a/openssl-sys/build/find_normal.rs +++ b/openssl-sys/build/find_normal.rs @@ -230,8 +230,12 @@ fn try_pkg_config() { /// /// Note that if this succeeds then the function does not return as vcpkg /// should emit all of the cargo metadata that we need. -#[cfg(target_env = "msvc")] fn try_vcpkg() { + let target = env::var("TARGET").unwrap(); + if !target.contains("windows") { + return; + } + // vcpkg will not emit any metadata if it can not find libraries // appropriate for the target triple with the desired linkage. @@ -255,9 +259,6 @@ fn try_vcpkg() { process::exit(0); } -#[cfg(not(target_env = "msvc"))] -fn try_vcpkg() {} - fn execute_command_and_get_output(cmd: &str, args: &[&str]) -> Option { let out = Command::new(cmd).args(args).output(); if let Ok(ref r1) = out { diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 3359165a333214b93cb9babbf4dfe00e570aacf7..21ccf3d0377e0dfaf61c51c71ba722e8c38db78a 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -4,7 +4,6 @@ extern crate cc; #[cfg(feature = "vendored")] extern crate openssl_src; extern crate pkg_config; -#[cfg(target_env = "msvc")] extern crate vcpkg; use std::collections::HashSet;