diff options
| author | Jay Lee <[email protected]> | 2017-03-29 19:25:00 +0800 |
|---|---|---|
| committer | Jay Lee <[email protected]> | 2017-03-29 19:25:00 +0800 |
| commit | 7c2422439435c9364d35c50832c5e892f9a8e5fa (patch) | |
| tree | 42f74c3d83fcdb9ff93f2e68d81dfbe0fc2d64bf | |
| parent | Release v0.9.10 (diff) | |
| download | rust-openssl-7c2422439435c9364d35c50832c5e892f9a8e5fa.tar.xz rust-openssl-7c2422439435c9364d35c50832c5e892f9a8e5fa.zip | |
show help message when pkg-config is missing
| -rw-r--r-- | openssl-sys/build.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 969c5983..340faf08 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -197,10 +197,15 @@ fn try_pkg_config() { return } - let lib = pkg_config::Config::new() + let lib = match pkg_config::Config::new() .print_system_libs(false) - .find("openssl") - .unwrap(); + .find("openssl") { + Ok(lib) => lib, + Err(e) => { + println!("run pkg_config fail: {:?}", e); + return; + } + }; validate_headers(&lib.include_paths); |