2018-04-18 07:22:44 +08:00
|
|
|
_find_package(${ARGS})
|
|
|
|
if(OPENSSL_FOUND)
|
2018-04-28 22:30:51 +08:00
|
|
|
find_library(OPENSSL_DL_LIBRARY NAMES dl)
|
|
|
|
if(OPENSSL_DL_LIBRARY)
|
|
|
|
list(APPEND OPENSSL_LIBRARIES "dl")
|
|
|
|
if(TARGET OpenSSL::Crypto)
|
|
|
|
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
|
|
|
|
endif()
|
2018-04-18 07:22:44 +08:00
|
|
|
endif()
|
2020-01-14 07:43:36 +08:00
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
find_package(ZLIB REQUIRED)
|
|
|
|
list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
list(APPEND OPENSSL_LIBRARIES ${ZLIB_LIBRARIES})
|
|
|
|
target_link_libraries(OpenSSL::Crypto INTERFACE Threads::Threads)
|
|
|
|
target_link_libraries(OpenSSL::SSL INTERFACE Threads::Threads)
|
|
|
|
target_link_libraries(OpenSSL::Crypto INTERFACE ZLIB::ZLIB)
|
|
|
|
target_link_libraries(OpenSSL::SSL INTERFACE ZLIB::ZLIB)
|
2018-04-18 07:22:44 +08:00
|
|
|
endif()
|