diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake index 53e970dfe..270ac87b6 100644 --- a/cmake/OpenSSL.cmake +++ b/cmake/OpenSSL.cmake @@ -10,6 +10,11 @@ if (WITH_TLS) set(OPENSSL_USE_STATIC_LIBS TRUE) endif() + if (BUILD_STATIC) + set(OPENSSL_USE_STATIC_LIBS TRUE) + endif() + + find_package(OpenSSL) if (OPENSSL_FOUND)