use library names supplied by vcpkg
This commit is contained in:
parent
7801226796
commit
03b8b29e4c
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed windows-msvc library names when using OpenSSL from vcpkg.
|
||||||
|
|
||||||
## [v0.9.54] - 2020-01-29
|
## [v0.9.54] - 2020-01-29
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ pkg-config = "0.3.9"
|
||||||
autocfg = "1.0"
|
autocfg = "1.0"
|
||||||
|
|
||||||
[target.'cfg(target_env = "msvc")'.build-dependencies]
|
[target.'cfg(target_env = "msvc")'.build-dependencies]
|
||||||
vcpkg = "0.2"
|
vcpkg = "0.2.8"
|
||||||
|
|
||||||
# We don't actually use metadeps for annoying reasons but this is still here for tooling
|
# We don't actually use metadeps for annoying reasons but this is still here for tooling
|
||||||
[package.metadata.pkg-config]
|
[package.metadata.pkg-config]
|
||||||
|
|
|
||||||
|
|
@ -194,31 +194,16 @@ fn try_pkg_config() {
|
||||||
/// should emit all of the cargo metadata that we need.
|
/// should emit all of the cargo metadata that we need.
|
||||||
#[cfg(target_env = "msvc")]
|
#[cfg(target_env = "msvc")]
|
||||||
fn try_vcpkg() {
|
fn try_vcpkg() {
|
||||||
use vcpkg;
|
|
||||||
|
|
||||||
// vcpkg will not emit any metadata if it can not find libraries
|
// vcpkg will not emit any metadata if it can not find libraries
|
||||||
// appropriate for the target triple with the desired linkage.
|
// appropriate for the target triple with the desired linkage.
|
||||||
|
|
||||||
let mut lib = vcpkg::Config::new()
|
let lib = vcpkg::Config::new()
|
||||||
.emit_includes(true)
|
.emit_includes(true)
|
||||||
.lib_name("libcrypto")
|
.find_package("openssl");
|
||||||
.lib_name("libssl")
|
|
||||||
.probe("openssl");
|
|
||||||
|
|
||||||
if let Err(e) = lib {
|
if let Err(e) = lib {
|
||||||
println!(
|
println!(
|
||||||
"note: vcpkg did not find openssl as libcrypto and libssl: {}",
|
"note: vcpkg did not find openssl: {}",
|
||||||
e
|
|
||||||
);
|
|
||||||
lib = vcpkg::Config::new()
|
|
||||||
.emit_includes(true)
|
|
||||||
.lib_name("libeay32")
|
|
||||||
.lib_name("ssleay32")
|
|
||||||
.probe("openssl");
|
|
||||||
}
|
|
||||||
if let Err(e) = lib {
|
|
||||||
println!(
|
|
||||||
"note: vcpkg did not find openssl as ssleay32 and libeay32: {}",
|
|
||||||
e
|
e
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue