Avoid empty include paths (i.e. cc -I "" ) as they are not supported by GCC. Fix #311
This commit is contained in:
parent
6bb3d8f1b5
commit
fcc6be2b01
|
|
@ -15,8 +15,11 @@ fn main() {
|
||||||
// rustc doesn't seem to work with pkg-config's output in mingw64
|
// rustc doesn't seem to work with pkg-config's output in mingw64
|
||||||
if !target.contains("windows") {
|
if !target.contains("windows") {
|
||||||
if let Ok(info) = pkg_config::find_library("openssl") {
|
if let Ok(info) = pkg_config::find_library("openssl") {
|
||||||
let paths = env::join_paths(info.include_paths).unwrap();
|
// avoid empty include paths as they are not supported by GCC
|
||||||
println!("cargo:include={}", paths.to_str().unwrap());
|
if info.include_paths.len() > 0 {
|
||||||
|
let paths = env::join_paths(info.include_paths).unwrap();
|
||||||
|
println!("cargo:include={}", paths.to_str().unwrap());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue