File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
impl super :: BuildConfig {
10
10
pub fn cmake ( & self ) {
11
+ static INSTALL_DIR : & str = "lib" ;
12
+
11
13
let mut cmk = cmake:: Config :: new ( & self . mbedtls_src ) ;
12
14
cmk. cflag ( format ! (
13
15
r#"-DMBEDTLS_CONFIG_FILE="\"{}\"""# ,
@@ -19,6 +21,8 @@ impl super::BuildConfig {
19
21
. define ( "GEN_FILES" , "ON" )
20
22
// Prefer unix-style over Apple-style Python3 on macOS, required for the Github Actions CI
21
23
. define ( "Python3_FIND_FRAMEWORK" , "LAST" )
24
+ // Ensure same installation directory is used on all platforms
25
+ . define ( "LIB_INSTALL_DIR" , INSTALL_DIR )
22
26
. build_target ( "install" ) ;
23
27
for cflag in & self . cflags {
24
28
cmk. cflag ( cflag) ;
@@ -50,7 +54,7 @@ impl super::BuildConfig {
50
54
51
55
println ! (
52
56
"cargo:rustc-link-search=native={}" ,
53
- dst. join( "lib" ) . to_str( ) . expect( "link-search UTF-8 error" )
57
+ dst. join( INSTALL_DIR ) . to_str( ) . expect( "link-search UTF-8 error" )
54
58
) ;
55
59
56
60
println ! ( "cargo:rustc-link-lib=static=mbedtls" ) ;
You can’t perform that action at this time.
0 commit comments