jit: make obj-to-bool collection conversion check cheaper
[hiphop-php.git] / CMake / FindLibEvent.cmake.bak
blobead18b4280dc8f15e0e7e94ead0221562b3ce4d6
1 # - Find LibEvent (a cross platform RPC lib/tool)
2 # This module defines
3 # LibEvent_INCLUDE_DIR, where to find LibEvent headers
4 # LibEvent_LIBS, LibEvent libraries
5 # LibEvent_FOUND, If false, do not try to use ant
6  
7 find_path(LibEvent_INCLUDE_DIR event.h PATHS
8     /usr/local/include
9     /opt/local/include
10   )
12 set(LibEvent_LIB_PATHS /usr/local/lib /opt/local/lib)
13 find_library(LibEvent_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
15 if (LibEvent_LIB AND LibEvent_INCLUDE_DIR)
16   set(LibEvent_FOUND TRUE)
17   set(LibEvent_LIB ${LibEvent_LIB})
18 else ()
19   set(LibEvent_FOUND FALSE)
20 endif ()
22 if (LibEvent_FOUND)
23   if (NOT LibEvent_FIND_QUIETLY)
24     message(STATUS "Found libevent: ${LibEvent_LIB}")
25   endif ()
26 else (LibEvent_FOUND)
27     if (LibEvent_FIND_REQUIRED)
28         message(FATAL_ERROR "Could NOT find libevent library.")
29     endif (LibEvent_FIND_REQUIRED)
30     message(STATUS "libevent NOT found.")
31 endif (LibEvent_FOUND)
33 mark_as_advanced(
34     LibEvent_LIB
35     LibEvent_INCLUDE_DIR
36   )