diff options
Diffstat (limited to 'contrib/cmake/FindEVENT.cmake')
-rw-r--r-- | contrib/cmake/FindEVENT.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/cmake/FindEVENT.cmake b/contrib/cmake/FindEVENT.cmake index 7904b6a..418ebab 100644 --- a/contrib/cmake/FindEVENT.cmake +++ b/contrib/cmake/FindEVENT.cmake @@ -30,6 +30,31 @@ else() endif() endif() + + +FIND_LIBRARY(EVENT_SSL_LIBRARY_RELEASE + NAMES event_openssl libevent_openssl + HINTS $ENV{EVENT_SRC}/.libs/ + SET(EVENT_SSL_FOUND ON) +) +if (EVENT_SSL_LIBRARY_RELEASE) + list(APPEND EVENT_LIBRARY optimized ${EVENT_SSL_LIBRARY_RELEASE}) +endif() + +FIND_LIBRARY(EVENT_SSL_LIBRARY_DEBUG + NAMES event_openssl_d libevent_openssl_d + HINTS $ENV{EVENT_SRC}/.libs/ +) +if (EVENT_SSL_LIBRARY_DEBUG) + list(APPEND EVENT_LIBRARY debug ${EVENT_SSL_LIBRARY_DEBUG}) +else() + if (UNIX AND EVENT_SSL_LIBRARY_RELEASE) + list(APPEND EVENT_LIBRARY debug ${EVENT_SSL_LIBRARY_RELEASE}) + endif() +endif() + + + if (NOT WIN32) FIND_LIBRARY(EVENT_LIBRARY_THREADS NAMES event_pthreads @@ -51,6 +76,8 @@ if (NOT WIN32) endif() +# message(FATAL_ERROR "EVENT_LIBRARY: ${EVENT_LIBRARY}") + INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(EVENT DEFAULT_MSG EVENT_LIBRARY EVENT_INCLUDE_DIR) MARK_AS_ADVANCED(EVENT_LIBRARY EVENT_INCLUDE_DIR) |