|
|
|
@ -12,7 +12,7 @@ diff --git a/build.rs b/build.rs
|
|
|
|
|
index 74b6a55..842ddb5 100644
|
|
|
|
|
--- a/build.rs
|
|
|
|
|
+++ b/build.rs
|
|
|
|
|
@@ -19,28 +19,27 @@ fn main() {
|
|
|
|
|
@@ -19,24 +19,21 @@ fn main() {
|
|
|
|
|
return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -20,15 +20,14 @@ index 74b6a55..842ddb5 100644
|
|
|
|
|
- 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") {
|
|
|
|
|
- if !cfg!(feature = "http2") || curl_config_reports_http2() {
|
|
|
|
|
- return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
- }
|
|
|
|
|
- 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");
|
|
|
|
|
return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@ -37,26 +36,14 @@ index 74b6a55..842ddb5 100644
|
|
|
|
|
- if try_vcpkg() {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if try_pkg_config() {
|
|
|
|
|
- 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;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
+ } else if try_pkg_config() {
|
|
|
|
|
+ return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ std::process::exit(1);
|
|
|
|
|
+
|
|
|
|
|
if !Path::new("curl/.git").exists() {
|
|
|
|
|
let _ = Command::new("git")
|
|
|
|
|
.args(&["submodule", "update", "--init"])
|
|
|
|
|
--
|
|
|
|
|
2.26.2
|
|
|
|
|
|
|
|
|
|