Skip to content

Commit

Permalink
Update build.rs
Browse files Browse the repository at this point in the history
Make search path spec prior to library spec(s)
  • Loading branch information
kazuki0824 authored Jul 25, 2023
1 parent 096a1e5 commit 519da46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions b25-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ fn main() {
cm.configure_arg("-DUSE_AVX2=ON");

if cfg!(target_os = "windows") {
// Link against Windows PC/SC
println!("cargo:rustc-link-search=native=C:\\Windows\\System32");
println!("cargo:rustc-link-lib=dylib=winscard");

if cfg!(target_env = "msvc") {
cm.generator("Visual Studio 17 2022");
/*
Expand All @@ -39,8 +43,6 @@ fn main() {
cm.generator("MinGW Makefiles");
println!("cargo:rustc-link-lib=ucrt");
}
println!("cargo:rustc-link-search=native=C:\\Windows\\System32");
println!("cargo:rustc-link-lib=dylib=winscard");
}

let res = cm.build();
Expand Down

0 comments on commit 519da46

Please sign in to comment.