[openssl] added support for platforms without libdl (#3368)

This commit is contained in:
Alexej Harm 2018-04-28 16:30:51 +02:00 committed by Robert Schumacher
parent 039abe258b
commit 38d139ceb8
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
_find_package(${ARGS})
if(OPENSSL_FOUND)
list(APPEND OPENSSL_LIBRARIES "dl")
if(TARGET OpenSSL::Crypto)
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
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()
endif()
endif()