diff --git a/CMakeLists.txt b/CMakeLists.txt index 93299333..d3802e0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) option(BYO_CRYPTO "Set this if you want to provide your own cryptography implementation. This will cause the defaults to not be compiled." OFF) option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto" OFF) +option(AWS_USE_CRYPTO_SHARED_LIBS "Force c-cal to use shared libs in Findcrypto" OFF) if (DEFINED CMAKE_PREFIX_PATH) file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) diff --git a/cmake/modules/Findcrypto.cmake b/cmake/modules/Findcrypto.cmake index fed83bbd..982a5ed2 100644 --- a/cmake/modules/Findcrypto.cmake +++ b/cmake/modules/Findcrypto.cmake @@ -70,7 +70,7 @@ else() ${CMAKE_INSTALL_PREFIX}/lib ) - if (BUILD_SHARED_LIBS) + if (BUILD_SHARED_LIBS OR AWS_USE_CRYPTO_SHARED_LIBS) if (crypto_SHARED_LIBRARY) set(crypto_LIBRARY ${crypto_SHARED_LIBRARY}) else()