From 4f76b32016dfbdf6214327041f888015dca7428d Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Mon, 28 Aug 2023 18:33:23 +0200
Subject: [PATCH] drop Windows-specific references to vcpkg
---
build/find_normal.rs | 34 ----------------------------------
build/main.rs | 1 -
2 files changed, 35 deletions(-)
diff --git a/build/find_normal.rs b/build/find_normal.rs
index 4d46103..00e7ee0 100644
--- a/build/find_normal.rs
+++ b/build/find_normal.rs
@@ -90,7 +90,6 @@ fn find_openssl_dir(target: &str) -> OsString {
}
try_pkg_config();
- try_vcpkg();
// FreeBSD and OpenBSD ship with Libre|OpenSSL but don't include a pkg-config file
if host == target && (target.contains("freebsd") || target.contains("openbsd")) {
@@ -226,39 +225,6 @@ fn try_pkg_config() {
process::exit(0);
}
-/// Attempt to find OpenSSL through vcpkg.
-///
-/// Note that if this succeeds then the function does not return as vcpkg
-/// should emit all of the cargo metadata that we need.
-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.
-
- let lib = match vcpkg::Config::new()
- .emit_includes(true)
- .find_package("openssl")
- {
- Ok(lib) => lib,
- Err(e) => {
- println!("note: vcpkg did not find openssl: {}", e);
- return;
- }
- };
-
- super::postprocess(&lib.include_paths);
-
- println!("cargo:rustc-link-lib=user32");
- println!("cargo:rustc-link-lib=gdi32");
- println!("cargo:rustc-link-lib=crypt32");
-
- process::exit(0);
-}
-
fn execute_command_and_get_output(cmd: &str, args: &[&str]) -> Option<String> {
let out = Command::new(cmd).args(args).output();
if let Ok(ref r1) = out {
diff --git a/build/main.rs b/build/main.rs
index 21ccf3d..21548b3 100644
--- a/build/main.rs
+++ b/build/main.rs
@@ -4,7 +4,6 @@ extern crate cc;
#[cfg(feature = "vendored")]
extern crate openssl_src;
extern crate pkg_config;
-extern crate vcpkg;
use std::collections::HashSet;
use std::env;
--
2.41.0