mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix LibeventConfig.cmake in case of no OpenSSL
Previously it fails with, due to empty OPENSSL_FOUND: CMake Error at /home/runner/work/libevent/libevent/build/LibeventConfig.cmake:64 (if): if given arguments: "3.30.3" "VERSION_LESS" "3.15.0" "AND" "1" "AND" "AND" "TRUE" Unknown arguments specified
This commit is contained in:
parent
68e18761ae
commit
e23924c293
@ -61,7 +61,7 @@ if(${LIBEVENT_STATIC_LINK})
|
||||
set(_AVAILABLE_LIBS "${LIBEVENT_STATIC_LIBRARIES}")
|
||||
|
||||
# CMake before 3.15 doesn't link OpenSSL to pthread/dl, do it ourselves instead
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.15.0" AND ${LIBEVENT_STATIC_LINK} AND ${OPENSSL_FOUND} AND ${Threads_FOUND})
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.15.0" AND "${LIBEVENT_STATIC_LINK}" AND "${OPENSSL_FOUND}" AND "${Threads_FOUND}")
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
endif ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user