diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 36dac3829c..d631d61f31 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -169,7 +169,9 @@ if(APPLE) find_package(OpenSSL REQUIRED) else() if(MINGW OR NOT WIN32) - set(OPENSSL_USE_STATIC_LIBS TRUE) + if(NOT BUILD_SHARED_LIBS) + set(OPENSSL_USE_STATIC_LIBS TRUE) + endif() find_package(OpenSSL REQUIRED) endif() endif()