Files
thehub/support/cmake/FindEvent.cmake
TomZ d7285c29b9 Follow the bugreport from im_uname about this
This should make cmake finish for him too.
2019-12-12 17:16:08 +01:00

23 lines
596 B
CMake

# Find Libevent
#
# Once done, this will define:
#
# Event_FOUND - system has Event
# Event_INCLUDE_DIRS - the Event include directories
# Event_LIBRARIES - link these to use Event
#
if (EVENT_INCLUDE_DIR AND EVENT_LIBRARY)
# Already in cache, be silent
set(EVENT_FIND_QUIETLY TRUE)
endif (EVENT_INCLUDE_DIR AND EVENT_LIBRARY)
pkg_check_modules(Event REQUIRED libevent_pthreads)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# brew installs the libs in some weird dir.
foreach (DIR ${Event_LIBRARY_DIRS})
LIST(PREPEND Event_LIBRARIES "-L${DIR}")
endforeach ()
endif ()