Don't use pkg-config on windows
This commit is contained in:
parent
8fdd0e2ec1
commit
d465f6c5bb
|
|
@ -14,10 +14,13 @@ fn main() {
|
||||||
let include_dir = env::var("OPENSSL_INCLUDE_DIR").ok();
|
let include_dir = env::var("OPENSSL_INCLUDE_DIR").ok();
|
||||||
|
|
||||||
if lib_dir.is_none() && include_dir.is_none() {
|
if lib_dir.is_none() && include_dir.is_none() {
|
||||||
|
// 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") {
|
if let Ok(info) = pkg_config::find_library("openssl") {
|
||||||
build_openssl_shim(&info.include_paths);
|
build_openssl_shim(&info.include_paths);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if let Some(mingw_paths) = get_mingw_in_path() {
|
if let Some(mingw_paths) = get_mingw_in_path() {
|
||||||
for path in mingw_paths {
|
for path in mingw_paths {
|
||||||
println!("cargo:rustc-flags=-L native={}", path);
|
println!("cargo:rustc-flags=-L native={}", path);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue