File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ pub struct Build {
22
22
pub struct Artifacts {
23
23
include_dir : PathBuf ,
24
24
lib_dir : PathBuf ,
25
+ bin_dir : PathBuf ,
25
26
libs : Vec < String > ,
26
27
target : String ,
27
28
shared : bool ,
@@ -412,6 +413,7 @@ impl Build {
412
413
413
414
Artifacts {
414
415
lib_dir : install_dir. join ( "lib" ) ,
416
+ bin_dir : install_dir. join ( "bin" ) ,
415
417
include_dir : install_dir. join ( "include" ) ,
416
418
libs : libs,
417
419
target : target. to_string ( ) ,
@@ -527,8 +529,12 @@ impl Artifacts {
527
529
}
528
530
println ! ( "cargo:include={}" , self . include_dir. display( ) ) ;
529
531
println ! ( "cargo:lib={}" , self . lib_dir. display( ) ) ;
530
- if !self . shared && self . target . contains ( "msvc" ) {
531
- println ! ( "cargo:rustc-link-lib=user32" ) ;
532
+ if self . target . contains ( "msvc" ) {
533
+ if self . shared {
534
+ println ! ( "cargo:rustc-link-search=native={}" , self . bin_dir. display( ) ) ;
535
+ } else {
536
+ println ! ( "cargo:rustc-link-lib=user32" ) ;
537
+ }
532
538
}
533
539
}
534
540
}
You can’t perform that action at this time.
0 commit comments