Message ID | 20201210154134.794-3-ynezz@true.cz |
---|---|
State | Accepted |
Delegated to: | Petr Štetiar |
Headers | show |
Series | fixes, improvements and CI | expand |
diff --git a/CMakeLists.txt b/CMakeLists.txt index 315aeb87c80b..42c7f1fb00de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,9 +13,10 @@ IF(MBEDTLS) 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)
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> --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)