forked from google/boringssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenSSLConfig.cmake
32 lines (27 loc) · 1.15 KB
/
OpenSSLConfig.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
include(${CMAKE_CURRENT_LIST_DIR}/OpenSSLTargets.cmake)
# Recursively collect dependency locations for the imported targets.
macro(_openssl_config_libraries libraries target)
get_property(_DEPS TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES)
foreach(_DEP ${_DEPS})
if(TARGET ${_DEP})
_openssl_config_libraries(${libraries} ${_DEP})
else()
list(APPEND ${libraries} ${_DEP})
endif()
endforeach()
get_property(_LOC TARGET ${target} PROPERTY LOCATION)
list(APPEND ${libraries} ${_LOC})
endmacro()
set(OPENSSL_FOUND YES)
get_property(OPENSSL_INCLUDE_DIR TARGET OpenSSL::SSL PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(OPENSSL_CRYPTO_LIBRARY TARGET OpenSSL::Crypto PROPERTY LOCATION)
_openssl_config_libraries(OPENSSL_CRYPTO_LIBRARIES OpenSSL::Crypto)
list(REMOVE_DUPLICATES OPENSSL_CRYPTO_LIBRARIES)
get_property(OPENSSL_SSL_LIBRARY TARGET OpenSSL::Crypto PROPERTY LOCATION)
_openssl_config_libraries(OPENSSL_SSL_LIBRARIES OpenSSL::SSL)
list(REMOVE_DUPLICATES OPENSSL_SSL_LIBRARIES)
set(OPENSSL_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES} ${OPENSSL_SSL_LIBRARIES})
list(REMOVE_DUPLICATES OPENSSL_LIBRARIES)
set(_DEP)
set(_DEPS)
set(_LOC)