summaryrefslogtreecommitdiff
path: root/indra/cmake/OpenSSL.cmake
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
commit786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch)
treeed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/OpenSSL.cmake
parent7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff)
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects.
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)