diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-12-11 14:07:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-11 14:07:08 -0500 |
commit | 6350752d6be2abfac68aa16e891dd859aa5cdafa (patch) | |
tree | 18c24336e664111ba9c3a5bfedec5c340ec0a19d /CMake/FindEpollShim.cmake | |
parent | Use return value of write (diff) | |
parent | Fix build on FreeBSD (diff) | |
download | sway-6350752d6be2abfac68aa16e891dd859aa5cdafa.tar.gz sway-6350752d6be2abfac68aa16e891dd859aa5cdafa.tar.zst sway-6350752d6be2abfac68aa16e891dd859aa5cdafa.zip |
Fix build on FreeBSD
Diffstat (limited to 'CMake/FindEpollShim.cmake')
-rw-r--r-- | CMake/FindEpollShim.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMake/FindEpollShim.cmake b/CMake/FindEpollShim.cmake new file mode 100644 index 00000000..b6bed142 --- /dev/null +++ b/CMake/FindEpollShim.cmake | |||
@@ -0,0 +1,17 @@ | |||
1 | # - Find EpollShim | ||
2 | # Once done, this will define | ||
3 | # | ||
4 | # EPOLLSHIM_FOUND - System has EpollShim | ||
5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories | ||
6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim | ||
7 | |||
8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) | ||
9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) | ||
10 | |||
11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) | ||
12 | set(EPOLLSHIM_FOUND TRUE) | ||
13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) | ||
14 | |||
15 | include(FindPackageHandleStandardArgs) | ||
16 | find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) | ||
17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) | ||