File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 55 * See the README as well as the LICENSE file for more information.
66 */
77
8- use std:: io:: ErrorKind ;
98use std:: {
109 default:: Default ,
1110 env,
11+ io:: ErrorKind ,
1212 path:: { Path , PathBuf } ,
1313 process:: Command ,
1414} ;
@@ -178,16 +178,13 @@ fn main() {
178178 // libcoap doesn't support overriding the MbedTLS CFLAGS, but doesn't set those
179179 // either, so we just set CFLAGS and hope they propagate.
180180 if let Some ( mbedtls_include) = env:: var_os ( "DEP_MBEDTLS_INCLUDE" ) {
181+ let mbedtls_library_path = Path :: new ( env:: var_os ( "DEP_MBEDTLS_CONFIG_H" ) . unwrap ( ) . as_os_str ( ) )
182+ . parent ( )
183+ . unwrap ( )
184+ . join ( "build" )
185+ . join ( "library" ) ;
181186 build_config. env ( "CFLAGS" , format ! ( "-I{}" , mbedtls_include. to_str( ) . unwrap( ) ) ) ;
182- build_config. env (
183- "PKG_CONFIG_PATH" ,
184- Path :: new ( mbedtls_include. as_os_str ( ) )
185- . parent ( )
186- . unwrap ( )
187- . join ( "lib" )
188- . join ( "pkgconfig" )
189- . into_os_string ( ) ,
190- ) ;
187+ build_config. env ( "LDFLAGS" , format ! ( "-L{}" , mbedtls_library_path. to_str( ) . unwrap( ) ) ) ;
191188 }
192189 } ,
193190 DtlsBackend :: GnuTls => {
You can’t perform that action at this time.
0 commit comments