Skip to content

Commit 1b4c155

Browse files
committed
Don't change PKG_CONFIG_PATH on MSVC
This is basically hopeless.
1 parent a6dee1a commit 1b4c155

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libgit2-sys/build.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,19 @@ fn main() {
179179

180180
fn register_dep(dep: &str) {
181181
if let Some(s) = env::var_os(&format!("DEP_{}_ROOT", dep)) {
182-
prepend("PKG_CONFIG_PATH", Path::new(&s).join("lib/pkgconfig"));
182+
if !cfg!(target_env = "msvc") {
183+
prepend("PKG_CONFIG_PATH", Path::new(&s).join("lib/pkgconfig"));
184+
}
183185
return
184186
}
185187
if let Some(s) = env::var_os(&format!("DEP_{}_INCLUDE", dep)) {
186188
let root = Path::new(&s).parent().unwrap();
187189
env::set_var(&format!("DEP_{}_ROOT", dep), root);
188190
let path = root.join("lib/pkgconfig");
189191
if path.exists() {
190-
prepend("PKG_CONFIG_PATH", path);
192+
if !cfg!(target_env = "msvc") {
193+
prepend("PKG_CONFIG_PATH", path);
194+
}
191195
return
192196
}
193197
}

0 commit comments

Comments
 (0)