From 89e6998054aed3f7798a0d8c0cf089cea9244668 Mon Sep 17 00:00:00 2001 From: Alexandru Negrila Date: Thu, 9 Apr 2020 09:09:21 +0300 Subject: [PATCH] Fix OpenSSL static link when BUILD_STATIC=ON is provided --- cmake/OpenSSL.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake index 53e970df..270ac87b 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)