Fixes following issue when mbed TLS libs are installed in different
paths:
/usr/bin/ld: cannot find -lmbedtls
/usr/bin/ld: cannot find -lmbedcrypto
/usr/bin/ld: cannot find -lmbedx509
Signed-off-by: Petr Štetiar <ynezz@true.cz>
IF(MBEDTLS)
ADD_DEFINITIONS(-DHAVE_MBEDTLS)
SET(SSL_SRC ustream-mbedtls.c)
- SET(SSL_LIB mbedtls mbedcrypto mbedx509 m)
+ FIND_LIBRARY(mbedtls_library mbedtls)
+ FIND_LIBRARY(mbedx509_library mbedx509)
+ FIND_LIBRARY(mbedcrypto_library mbedcrypto)
+ SET(SSL_LIB ${mbedtls_library} ${mbedx509_library} ${mbedcrypto_library} m)
ELSEIF(WOLFSSL)
ADD_DEFINITIONS(-DHAVE_WOLFSSL)
FIND_LIBRARY(wolfssl_library wolfssl)