summaryrefslogtreecommitdiff
path: root/indra/cmake/OpenSSL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/OpenSSL.cmake')
-rw-r--r--indra/cmake/OpenSSL.cmake21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 32400f5e4e..80b419c36e 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,23 +1,22 @@
# -*- cmake -*-
include(Prebuilt)
-set(OpenSSL_FIND_QUIETLY ON)
-set(OpenSSL_FIND_REQUIRED ON)
+if( TARGET openssl::openssl )
+ return()
+endif()
+create_target(openssl::openssl)
if (USESYSTEMLIBS)
include(FindOpenSSL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openssl)
if (WINDOWS)
- set(OPENSSL_LIBRARIES libssl libcrypto)
- else (WINDOWS)
- set(OPENSSL_LIBRARIES ssl crypto)
+ set_target_libraries(openssl::openssl libssl libcrypto)
+ elseif (LINUX)
+ set_target_libraries(openssl::openssl ssl crypto dl)
+ else()
+ set_target_libraries(openssl::openssl ssl crypto)
endif (WINDOWS)
- set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
-if (LINUX)
- set(CRYPTO_LIBRARIES crypto dl)
-elseif (DARWIN)
- set(CRYPTO_LIBRARIES crypto)
-endif (LINUX)