Skip to content

Commit 283036c

Browse files
authored
Merge pull request #540 from joshtriplett/metadeps
Use metadeps to specify pkg-config dependencies declaratively
2 parents 762510a + 9ff3ce4 commit 283036c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

openssl-sys/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ build = "build.rs"
1414
libc = "0.2"
1515

1616
[build-dependencies]
17-
pkg-config = "0.3"
17+
metadeps = "1"
1818

1919
[target.'cfg(windows)'.dependencies]
2020
user32-sys = "0.2"
2121
gdi32-sys = "0.2"
22+
23+
[package.metadata.pkg-config]
24+
openssl = "1.0.1"

openssl-sys/build.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern crate pkg_config;
1+
extern crate metadeps;
22

33
use std::collections::HashSet;
44
use std::env;
@@ -172,8 +172,8 @@ fn try_pkg_config() {
172172
// cflags dirs for showing us lots of `-I`.
173173
env::set_var("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", "1");
174174

175-
let lib = match pkg_config::find_library("openssl") {
176-
Ok(lib) => lib,
175+
let lib = match metadeps::probe() {
176+
Ok(mut libs) => libs.remove("openssl").unwrap(),
177177
Err(_) => return,
178178
};
179179

0 commit comments

Comments
 (0)