Fixes following issue when wolfSSL libs are installed in different
paths:
/usr/bin/ld: cannot find -lwolfssl
Signed-off-by: Petr Štetiar <ynezz@true.cz>
SET(SSL_LIB mbedtls mbedcrypto mbedx509 m)
ELSEIF(WOLFSSL)
ADD_DEFINITIONS(-DHAVE_WOLFSSL)
+ FIND_LIBRARY(wolfssl_library wolfssl)
SET(SSL_SRC ustream-io-wolfssl.c ustream-openssl.c)
- SET(SSL_LIB wolfssl m)
- SET(CMAKE_REQUIRED_LIBRARIES "-lwolfssl -lm")
+ SET(SSL_LIB ${wolfssl_library} m)
+ SET(CMAKE_REQUIRED_LIBRARIES "${wolfssl_library} -lm")
CHECK_SYMBOL_EXISTS (wolfSSL_SSLSetIORecv "wolfssl/ssl.h"
HAVE_WOLFSSL_SSLSETIORECV)
IF (NOT HAVE_WOLFSSL_SSLSETIORECV)