diff --git a/Cargo.toml b/Cargo.toml index 71932506..34b28d19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,6 @@ libc = { version = "0.2.43", optional = true } pkg-config = "0.3.9" cc = "1.0.18" cmake = { version = "0.1.44", optional = true } - -[target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2" [features] diff --git a/build.rs b/build.rs index ca8860ad..51ebe6bf 100644 --- a/build.rs +++ b/build.rs @@ -42,7 +42,7 @@ fn main() { } } - if target.contains("msvc") { + if target.contains("windows") { if try_vcpkg() { return; } @@ -158,18 +158,11 @@ mod build_zng; #[cfg(feature = "zlib-ng")] use build_zng::build_zlib_ng; -#[cfg(not(target_env = "msvc"))] -fn try_vcpkg() -> bool { - false -} - -#[cfg(target_env = "msvc")] fn try_vcpkg() -> bool { // see if there is a vcpkg tree with zlib installed match vcpkg::Config::new() .emit_includes(true) - .lib_names("zlib", "zlib1") - .probe("zlib") + .find_package("zlib") { Ok(_) => true, Err(e) => {