Fix cross-compilation for Windows on Linux

This commit is contained in:
chrox
2023-05-24 21:49:22 +02:00
committed by Till Höppner
parent 85a2f075d7
commit 0b7cf67577
+7 -1
View File
@@ -225,7 +225,13 @@ fn build(target_os: &str) -> io::Result<()> {
"--arch={}",
env::var("CARGO_CFG_TARGET_ARCH").unwrap()
));
configure.arg(format!("--target_os={}", target_os));
if target_os == "windows" {
// fix `configure: Unknown OS 'windows'`
configure.arg(format!("--target_os={}", "mingw32"));
} else {
configure.arg(format!("--target_os={}", target_os));
}
}
// control debug build