@@ -28,6 +28,15 @@ fn feature_enabled(feature: &str) -> bool {
28
28
/// - msys2 `/` is `C:\msys64\` in Windows by default install
29
29
/// - It can be convert using `cygpath` command
30
30
fn windows_gnu_system ( ) {
31
+ let include_path = String :: from_utf8 (
32
+ Command :: new ( "cygpath" )
33
+ . arg ( "-w" )
34
+ . arg ( "/mingw64/include" )
35
+ . output ( )
36
+ . expect ( "Failed to exec cygpath" )
37
+ . stdout ,
38
+ )
39
+ . expect ( "cygpath output includes non UTF-8 string" ) ;
31
40
let lib_path = String :: from_utf8 (
32
41
Command :: new ( "cygpath" )
33
42
. arg ( "-w" )
@@ -42,6 +51,8 @@ fn windows_gnu_system() {
42
51
)
43
52
. expect ( "cygpath output includes non UTF-8 string" ) ;
44
53
println ! ( "cargo:rustc-link-search={}" , lib_path) ;
54
+ println ! ( "cargo:INCLUDE={}" , include_path) ;
55
+ println ! ( "cargo:LIBRARY={}" , lib_path) ;
45
56
}
46
57
47
58
/// Use vcpkg for msvc "system" feature
@@ -75,6 +86,8 @@ fn macos_system() {
75
86
76
87
println ! ( "cargo:rustc-link-search={}/lib" , openblas. display( ) ) ;
77
88
println ! ( "cargo:rustc-link-search={}/lib" , libomp. display( ) ) ;
89
+ println ! ( "cargo:INCLUDE={}" , openblas. join( "include" ) . display( ) ) ;
90
+ println ! ( "cargo:LIBRARY={}" , openblas. join( "lib" ) . display( ) ) ;
78
91
}
79
92
80
93
fn main ( ) {
@@ -219,6 +232,8 @@ fn build() {
219
232
} ;
220
233
221
234
println ! ( "cargo:rustc-link-search={}" , source. display( ) ) ;
235
+ println ! ( "cargo:INCLUDE={}" , source. display( ) ) ;
236
+ println ! ( "cargo:LIBRARY={}" , source. display( ) ) ;
222
237
for search_path in & make_conf. c_extra_libs . search_paths {
223
238
println ! ( "cargo:rustc-link-search={}" , search_path. display( ) ) ;
224
239
}
0 commit comments