Sha256: ff08bc776ae4d76b1031a7a73f9da2b5a7ba3f4a3165cd05ccca01dae23fdccc

Contents?: true

Size: 1.64 KB

Versions: 6

Compression:

Stored size: 1.64 KB

Contents

# Locate libevent library
# This module defines
#  HAVE_LIBEVENT, if false, do not try to link with libevent
#  LIBEVENT_LIBRARIES, Library path and libs
#  LIBEVENT_INCLUDE_DIR, where to find the ICU headers
#  HAVE_LIBEVENT
#  HAVE_LIBEVENT2

FIND_PATH(LIBEVENT_INCLUDE_DIR evutil.h
          HINTS
               ${LIBEVENT_ROOT}
               ENV LIBEVENT_DIR
          PATH_SUFFIXES include
          PATHS
               ${DEPS_INCLUDE_DIR}
               ~/Library/Frameworks
               /Library/Frameworks
               /opt/local
               /opt/csw
               /opt/libevent
               /opt)

FIND_LIBRARY(LIBEVENT_LIBRARIES
             NAMES event_core libevent_core
             HINTS
                 ${LIBEVENT_ROOT}
                 ENV LIBEVENT_DIR
             PATHS
                 ${DEPS_LIB_DIR}
                 ~/Library/Frameworks
                 /Library/Frameworks
                 /opt/local
                 /opt/csw
                 /opt/libevent
                 /opt)

INCLUDE(CMakePushCheckState)
INCLUDE(CheckFunctionExists)

IF (LIBEVENT_LIBRARIES AND LIBEVENT_INCLUDE_DIR)
  SET(HAVE_LIBEVENT true)
  MESSAGE(STATUS "Found libevent in ${LIBEVENT_INCLUDE_DIR} : ${LIBEVENT_LIBRARIES}")
  CMAKE_PUSH_CHECK_STATE()
  SET(CMAKE_REQUIRED_FLAGS "-I${LIBEVENT_INCLUDE_DIR}")
  SET(CMAKE_REQUIRED_INCLUDES "event2/event.h")
  SET(CMAKE_REQUIRED_LIBRARIES ${LIBEVENT_LIBRARIES})
  CHECK_FUNCTION_EXISTS(event_new HAVE_LIBEVENT2)
  CMAKE_POP_CHECK_STATE()

ELSE (LIBEVENT_LIBRARIES)
  SET(HAVE_LIBEVENT false)
ENDIF (LIBEVENT_LIBRARIES AND LIBEVENT_INCLUDE_DIR)

MARK_AS_ADVANCED(HAVE_LIBEVENT LIBEVENT_INCLUDE_DIR LIBEVENT_LIBRARIES)

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
mt-libcouchbase-1.4.03 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake
mt-libcouchbase-1.4.02 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake
mt-libcouchbase-1.4.01 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake
mt-libcouchbase-1.4.0 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake
libcouchbase-1.3.2 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake
libcouchbase-1.3.0 ext/libcouchbase/cmake/Modules/FindCouchbaseLibevent.cmake