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.cmake29
1 files changed, 11 insertions, 18 deletions
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 32400f5e4e..d586396105 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,23 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
-set(OpenSSL_FIND_QUIETLY ON)
-set(OpenSSL_FIND_REQUIRED ON)
+include_guard()
+create_target(ll::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)
- endif (WINDOWS)
- set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(openssl)
+if (WINDOWS)
+ set_target_libraries(ll::openssl libssl libcrypto)
+elseif (LINUX)
+ set_target_libraries(ll::openssl ssl crypto dl)
+else()
+ set_target_libraries(ll::openssl ssl crypto)
+endif (WINDOWS)
+set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include)
-if (LINUX)
- set(CRYPTO_LIBRARIES crypto dl)
-elseif (DARWIN)
- set(CRYPTO_LIBRARIES crypto)
-endif (LINUX)