1b877906bSopenharmony_ci# Find EpollShim
2b877906bSopenharmony_ci# Once done, this will define
3b877906bSopenharmony_ci#
4b877906bSopenharmony_ci#   EPOLLSHIM_FOUND - System has EpollShim
5b877906bSopenharmony_ci#   EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
6b877906bSopenharmony_ci#   EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim
7b877906bSopenharmony_ci
8b877906bSopenharmony_cifind_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
9b877906bSopenharmony_cifind_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
10b877906bSopenharmony_ci
11b877906bSopenharmony_ciif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
12b877906bSopenharmony_ci	set(EPOLLSHIM_FOUND TRUE)
13b877906bSopenharmony_ciendif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
14b877906bSopenharmony_ci
15b877906bSopenharmony_ciinclude(FindPackageHandleStandardArgs)
16b877906bSopenharmony_cifind_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
17b877906bSopenharmony_cimark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)
18