From 274cc7067e131d0c7e1bcdc3959bc8fbd895c942 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 17 May 2020 16:00:46 +0200 Subject: [PATCH] Make static-curl/static-ssl features a noop Signed-off-by: Igor Raits --- build.rs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/build.rs b/build.rs index 74b6a55..842ddb5 100644 --- a/build.rs +++ b/build.rs @@ -19,24 +19,21 @@ fn main() { return println!("cargo:rustc-flags=-l curl"); } - // If the static-curl feature is disabled, probe for a system-wide libcurl. - if !cfg!(feature = "static-curl") { - // OSX and Haiku ships libcurl by default, so we just use that version - // so long as it has the right features enabled. - if (target.contains("apple") || target.contains("haiku")) - && (!cfg!(feature = "http2") || curl_config_reports_http2()) - { + // OSX and Haiku ships libcurl by default, so we just use that version + // so long as it has the right features enabled. + if target.contains("apple") || target.contains("haiku") { + if !cfg!(feature = "http2") || curl_config_reports_http2() { return println!("cargo:rustc-flags=-l curl"); } + } - // Next, fall back and try to use pkg-config if its available. - if windows { - if try_vcpkg() { - return; - } - } else if try_pkg_config() { + // Next, fall back and try to use pkg-config if its available. + if windows { + if try_vcpkg() { return; } + } else if try_pkg_config() { + return; } if !Path::new("curl/.git").exists() {