show help message when pkg-config is missing

This commit is contained in:
Jay Lee 2017-03-29 19:25:00 +08:00
parent 42ad50ae67
commit 7c24224394
1 changed files with 8 additions and 3 deletions

View File

@ -197,10 +197,15 @@ fn try_pkg_config() {
return return
} }
let lib = pkg_config::Config::new() let lib = match pkg_config::Config::new()
.print_system_libs(false) .print_system_libs(false)
.find("openssl") .find("openssl") {
.unwrap(); Ok(lib) => lib,
Err(e) => {
println!("run pkg_config fail: {:?}", e);
return;
}
};
validate_headers(&lib.include_paths); validate_headers(&lib.include_paths);