diff --git a/CMakeLists.txt b/CMakeLists.txt index 8951dc46c..c5994d3b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,11 +365,11 @@ if (ENABLE_ENCRYPTION) set (SSL_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR}) set (SSL_LIBRARIES ${MBEDTLS_LIBRARIES}) endif() + if (WIN32) + set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt) + endif() if ("${SSL_LIBRARIES}" STREQUAL "") set (SSL_LIBRARIES mbedtls mbedcrypto) - if (WIN32) - set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt) - endif() endif() message(STATUS "SSL enforced mbedtls: -I ${SSL_INCLUDE_DIRS} -l;${SSL_LIBRARIES}")