Files

23 lines
596 B
CMake
Raw Permalink Normal View History

2018-02-10 14:59:45 +01:00
# 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 ()