Commit 8851d0d 1 parent d89b3d8 commit 8851d0d Copy full SHA for 8851d0d
File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -44,3 +44,6 @@ thiserror = "1"
44
44
[lib ]
45
45
name = " mongoodbc"
46
46
crate-type = [" cdylib" , " lib" ]
47
+
48
+ [target .'cfg(windows)' .build-dependencies ]
49
+ winres = " 0.1"
Original file line number Diff line number Diff line change
1
+ #[ cfg( windows) ]
2
+ extern crate winres;
3
+
4
+ #[ cfg( windows) ]
5
+ fn main ( ) {
6
+ // the default for winres is to parse the version number from the neighboring Cargo.toml
7
+ let mut res = winres:: WindowsResource :: new ( ) ;
8
+ res. set_version_info ( winres:: VersionInfo :: FILETYPE , 2 ) ; // Dll file
9
+ res. set ( "CompanyName" , "MongoDB Inc." ) ;
10
+
11
+ // compile will write the rc file, and enable the cargo linker to link the compiled resource file
12
+ res. compile ( ) . unwrap ( ) ;
13
+ }
14
+
15
+ #[ cfg( not( windows) ) ]
16
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments