Merge pull request #312 from maximih/master

Fix #311 - Avoid empty include paths
This commit is contained in:
Steven Fackler 2015-11-28 18:40:20 -05:00
commit f26e82386f
1 changed files with 5 additions and 2 deletions

View File

@ -15,8 +15,11 @@ fn main() {
// rustc doesn't seem to work with pkg-config's output in mingw64
if !target.contains("windows") {
if let Ok(info) = pkg_config::find_library("openssl") {
// avoid empty include paths as they are not supported by GCC
if info.include_paths.len() > 0 {
let paths = env::join_paths(info.include_paths).unwrap();
println!("cargo:include={}", paths.to_str().unwrap());
}
return;
}
}