From 260d975101d15cae62e01530b04dc686013c9906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Dukai?= Date: Thu, 30 Mar 2023 22:25:10 +0200 Subject: [PATCH] Fix build script on Windows with MYSYS2 --- proj-sys/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proj-sys/build.rs b/proj-sys/build.rs index fa0c0cc3..34fd2124 100644 --- a/proj-sys/build.rs +++ b/proj-sys/build.rs @@ -163,6 +163,12 @@ fn build_from_source() -> Result> println!("cargo:rustc-link-lib=dylib=stdc++"); } else if cfg!(target_os = "macos") { println!("cargo:rustc-link-lib=dylib=c++"); + } else if cfg!(target_os = "windows") { + if cfg!(target_env = "gnu") { + println!("cargo:rustc-link-lib=dylib=stdc++"); + } else { + println!("cargo:warning=proj-sys: Not configuring an explicit C++ standard library on this target."); + } } else { println!("cargo:warning=proj-sys: Not configuring an explicit C++ standard library on this target."); }