summaryrefslogtreecommitdiffstats
path: root/contrib/cmake/FindLibEvent.cmake
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-12 13:30:14 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-12 13:30:14 (GMT)
commit59b51d5e70bd51a59d03c46e44148f53a0bf99a6 (patch)
treeb82a80a45eaf0f7db7a0165d636f6e7c281bdf25 /contrib/cmake/FindLibEvent.cmake
parent46b41e28989ea66eeebe0b8a35a52fb2d22abf3f (diff)
downloaduscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.zip
uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.gz
uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.bz2
Corrected gitignore and travis config
Diffstat (limited to 'contrib/cmake/FindLibEvent.cmake')
-rw-r--r--contrib/cmake/FindLibEvent.cmake83
1 files changed, 83 insertions, 0 deletions
diff --git a/contrib/cmake/FindLibEvent.cmake b/contrib/cmake/FindLibEvent.cmake
new file mode 100644
index 0000000..47872fe
--- /dev/null
+++ b/contrib/cmake/FindLibEvent.cmake
@@ -0,0 +1,83 @@
+FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h
+ PATH_SUFFIXES include
+ PATHS
+ /usr/local
+ /usr
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+ HINTS $ENV{LIBEVENT_SRC}
+)
+
+FIND_LIBRARY(LIBEVENT_LIBRARY_RELEASE
+ NAMES event libevent
+ HINTS $ENV{LIBEVENT_SRC}/.libs/
+)
+if (LIBEVENT_LIBRARY_RELEASE)
+ list(APPEND LIBEVENT_LIBRARIES optimized ${LIBEVENT_LIBRARY_RELEASE})
+endif()
+
+FIND_LIBRARY(LIBEVENT_LIBRARY_DEBUG
+ NAMES event_d libevent_d
+ HINTS $ENV{LIBEVENT_SRC}/.libs/
+)
+if (LIBEVENT_LIBRARY_DEBUG)
+ list(APPEND LIBEVENT_LIBRARIES debug ${LIBEVENT_LIBRARY_DEBUG})
+else()
+ if (LIBEVENT_LIBRARY_RELEASE)
+ list(APPEND LIBEVENT_LIBRARIES debug ${LIBEVENT_LIBRARY_RELEASE})
+ endif()
+endif()
+
+
+
+FIND_LIBRARY(LIBEVENT_SSL_LIBRARY_RELEASE
+ NAMES event_openssl libevent_openssl
+ HINTS $ENV{LIBEVENT_SRC}/.libs/
+)
+if (LIBEVENT_SSL_LIBRARY_RELEASE)
+ list(APPEND LIBEVENT_LIBRARIES optimized ${LIBEVENT_SSL_LIBRARY_RELEASE})
+ SET(LIBEVENT_SSL_FOUND ON)
+endif()
+
+FIND_LIBRARY(LIBEVENT_SSL_LIBRARY_DEBUG
+ NAMES event_openssl_d libevent_openssl_d
+ HINTS $ENV{LIBEVENT_SRC}/.libs/
+)
+if (LIBEVENT_SSL_LIBRARY_DEBUG)
+ list(APPEND LIBEVENT_LIBRARIES debug ${LIBEVENT_SSL_LIBRARY_DEBUG})
+else()
+ if (LIBEVENT_SSL_LIBRARY_RELEASE)
+ list(APPEND LIBEVENT_LIBRARIES debug ${LIBEVENT_SSL_LIBRARY_RELEASE})
+ endif()
+endif()
+
+
+
+if (NOT WIN32)
+ FIND_LIBRARY(LIBEVENT_LIBRARY_THREADS
+ NAMES event_pthreads
+ HINTS $ENV{EVENT_SRC}/.libs/
+ )
+ list (APPEND LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARY_THREADS})
+
+ FIND_LIBRARY(LIBEVENT_LIBRARY_EXTRA
+ NAMES event_extra
+ HINTS $ENV{LIBEVENT_SRC}/.libs/
+ )
+ list (APPEND LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARY_EXTRA})
+
+ FIND_LIBRARY(LIBEVENT_LIBRARY_CORE
+ NAMES event_core
+ HINTS $ENV{EVENT_SRC}/.libs/
+ )
+ list (APPEND LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARY_CORE})
+
+endif()
+
+#message(FATAL_ERROR "EVENT_SSL_FOUND: ${EVENT_SSL_FOUND}")
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBEVENT DEFAULT_MSG LIBEVENT_LIBRARIES LIBEVENT_INCLUDE_DIR)
+MARK_AS_ADVANCED(LIBEVENT_LIBRARIES LIBEVENT_INCLUDE_DIR LIBEVENT_SSL_FOUND)