diff --git a/3rdParty/libev/CMakeLists.txt b/3rdParty/libev/CMakeLists.txt index 406b910c90..de00580f7b 100755 --- a/3rdParty/libev/CMakeLists.txt +++ b/3rdParty/libev/CMakeLists.txt @@ -23,14 +23,17 @@ endif () include(CheckIncludeFile) -CHECK_INCLUDE_FILE(poll.h HAVE_POLL_H) +if (MSVC) + CHECK_INCLUDE_FILE("winsock.h" HAVE_SYS_SELECT_H) +else() + CHECK_INCLUDE_FILE(poll.h HAVE_POLL_H) CHECK_INCLUDE_FILE(port.h HAVE_PORT_H) CHECK_INCLUDE_FILE(sys/epoll.h HAVE_SYS_EPOLL_H) CHECK_INCLUDE_FILE(sys/event.h HAVE_SYS_EVENT_H) CHECK_INCLUDE_FILE(sys/inotify.h HAVE_SYS_INOTIFY_H) CHECK_INCLUDE_FILE(sys/select.h HAVE_SYS_SELECT_H) CHECK_INCLUDE_FILE(sys/signalfd.h HAVE_SYS_SIGNALFD_H) -CHECK_INCLUDE_FILE("winsock.h" HAVE_WINSOCK_H) +enndif() include(CheckFunctionExists) @@ -39,7 +42,11 @@ CHECK_FUNCTION_EXISTS(epoll_ctl HAVE_EPOLL_CTL) CHECK_FUNCTION_EXISTS(kqueue HAVE_KQUEUE) CHECK_FUNCTION_EXISTS(port_create HAVE_PORT_CREATE) CHECK_FUNCTION_EXISTS(poll HAVE_POLL) -CHECK_FUNCTION_EXISTS(select HAVE_SELECT) +if (MSVC) + set(HAVE_SELECT 1) # Force select for windows. +else() + CHECK_FUNCTION_EXISTS(select HAVE_SELECT) +endif() CHECK_FUNCTION_EXISTS(eventfd HAVE_EVENTFD) CHECK_FUNCTION_EXISTS(signalfd HAVE_SIGNALFD) CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)