diff options
| author | Steven Fackler <[email protected]> | 2016-12-25 12:17:45 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-12-25 12:17:45 -0500 |
| commit | 283036c5ad5b2dacddd50cbc679aafa633db00f5 (patch) | |
| tree | 3fea9c5b3a185779bb78cbed377e067b7d4a0747 | |
| parent | Release v0.9.4 (diff) | |
| parent | Use metadeps to specify pkg-config dependencies declaratively (diff) | |
| download | rust-openssl-283036c5ad5b2dacddd50cbc679aafa633db00f5.tar.xz rust-openssl-283036c5ad5b2dacddd50cbc679aafa633db00f5.zip | |
Merge pull request #540 from joshtriplett/metadeps
Use metadeps to specify pkg-config dependencies declaratively
| -rw-r--r-- | openssl-sys/Cargo.toml | 5 | ||||
| -rw-r--r-- | openssl-sys/build.rs | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 24a16f56..b3e672d6 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -14,8 +14,11 @@ build = "build.rs" libc = "0.2" [build-dependencies] -pkg-config = "0.3" +metadeps = "1" [target.'cfg(windows)'.dependencies] user32-sys = "0.2" gdi32-sys = "0.2" + +[package.metadata.pkg-config] +openssl = "1.0.1" diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index ce990be3..b530c2e3 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -1,4 +1,4 @@ -extern crate pkg_config; +extern crate metadeps; use std::collections::HashSet; use std::env; @@ -172,8 +172,8 @@ fn try_pkg_config() { // cflags dirs for showing us lots of `-I`. env::set_var("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", "1"); - let lib = match pkg_config::find_library("openssl") { - Ok(lib) => lib, + let lib = match metadeps::probe() { + Ok(mut libs) => libs.remove("openssl").unwrap(), Err(_) => return, }; |