Skip to content

Commit

Permalink
Merge pull request #191 from spritetong/master
Browse files Browse the repository at this point in the history
Support pkg_config for MSVC.
  • Loading branch information
a1ien committed Feb 6, 2024
2 parents fd51185 + 4b1a7aa commit 15c2910
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libusb1-sys/build.rs
Expand Up @@ -24,8 +24,12 @@ fn find_libusb_pkg(_statik: bool) -> bool {
match vcpkg::Config::new().find_package("libusb") {
Ok(_) => true,
Err(e) => {
println!("Can't find libusb pkg: {:?}", e);
false
if pkg_config::probe_library("libusb-1.0").is_ok() {
true
} else {
println!("Can't find libusb pkg: {:?}", e);
false
}
}
}
}
Expand Down

0 comments on commit 15c2910

Please sign in to comment.