Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b0e2b1 commit 86ad505Copy full SHA for 86ad505
src/lib.rs
@@ -139,6 +139,15 @@ impl Build {
139
// Change the install directory to happen inside of the build directory.
140
if host.contains("pc-windows-gnu") {
141
configure.arg(&format!("--prefix={}", sanitize_sh(&install_dir)));
142
+ } else if host.contains("pc-windows-msvc") {
143
+ // On Windows, the prefix argument does not support \ path seperators
144
+ // when cross compiling.
145
+ // Always use / as a path seperator instead of \, since that works for both
146
+ // native and cross builds.
147
+ configure.arg(&format!(
148
+ "--prefix={}",
149
+ install_dir.to_str().unwrap().replace("\\", "/")
150
+ ));
151
} else {
152
configure.arg(&format!("--prefix={}", install_dir.display()));
153
}
0 commit comments