Skip to content

Commit 3202f25

Browse files
Add a new cmake option OLP_SDK_USE_LIBCRYPTO (#1309)
A new option OLP_SDK_USE_LIBCRYPTO is used to conditionally enable or disable the libcrypto dependency when needed. Resolves: OLPEDGE-2735 Signed-off-by: Mykhailo Kuchma <[email protected]>
1 parent 7f13acb commit 3202f25

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

olp-cpp-sdk-core/cmake/curl.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ if(CURL_FOUND AND NOT NETWORK_NO_CURL)
3131
find_package(OpenSSL)
3232
if(OPENSSL_FOUND)
3333
add_definitions(-DOLP_SDK_NETWORK_HAS_OPENSSL)
34-
include_directories(${OPENSSL_INCLUDE_DIR})
35-
set(OLP_SDK_NETWORK_CURL_LIBRARIES ${OLP_SDK_NETWORK_CURL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY})
34+
35+
option(OLP_SDK_USE_LIBCRYPTO "Enables the libcrypto dependency" ON)
36+
37+
if(OLP_SDK_USE_LIBCRYPTO)
38+
include_directories(${OPENSSL_INCLUDE_DIR})
39+
set(OLP_SDK_NETWORK_CURL_LIBRARIES ${OLP_SDK_NETWORK_CURL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY})
40+
endif()
3641
endif()
3742

3843
option(OLP_SDK_ENABLE_CURL_VERBOSE "Enable support for CURL_VERBOSE environment variable to set libcurl to verbose mode" OFF)

0 commit comments

Comments
 (0)