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 411c016 commit 75d5de3Copy full SHA for 75d5de3
libssh-rs-sys/build.rs
@@ -260,8 +260,15 @@ fn main() {
260
cfg.compile("libssh");
261
262
if target.contains("windows") {
263
- println!("cargo:rustc-link-lib=libcrypto");
264
- println!("cargo:rustc-link-lib=libssl");
+ if target.contains("windows-msvc") {
+ // target `windows-msvc` expects `lib` prefix
265
+ println!("cargo:rustc-link-lib=libcrypto");
266
+ println!("cargo:rustc-link-lib=libssl");
267
+ } else {
268
+ // target `windows-gnu` adds the `lib` prefix
269
+ println!("cargo:rustc-link-lib=crypto");
270
+ println!("cargo:rustc-link-lib=ssl");
271
+ }
272
println!("cargo:rustc-link-lib=crypt32");
273
println!("cargo:rustc-link-lib=user32");
274
println!("cargo:rustc-link-lib=shell32");
0 commit comments