Skip to content

Commit 256fdcf

Browse files
Look for OpenSSL only when needed (#1355)
Unconditional search may break the build in some cases when OpenSSL was already found in some parent projects Relates-To: OAM-1768 Signed-off-by: Andrey Kashcheev <[email protected]>
1 parent bf61566 commit 256fdcf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2019-2021 HERE Europe B.V.
1+
# Copyright (C) 2019-2022 HERE Europe B.V.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -32,7 +32,10 @@ if(CURL_FOUND AND NOT NETWORK_NO_CURL)
3232
add_definitions(-DOLP_SDK_ENABLE_ANDROID_CURL)
3333
endif()
3434

35-
find_package(OpenSSL)
35+
if(NOT OPENSSL_FOUND)
36+
find_package(OpenSSL)
37+
endif()
38+
3639
if(OPENSSL_FOUND)
3740
add_definitions(-DOLP_SDK_NETWORK_HAS_OPENSSL)
3841

0 commit comments

Comments
 (0)