summaryrefslogtreecommitdiffstats
path: root/CMake/FindEpollShim.cmake
diff options
context:
space:
mode:
authorLibravatar Greg V <greg@unrelenting.technology>2016-12-08 15:34:08 +0300
committerLibravatar Greg V <greg@unrelenting.technology>2016-12-09 19:32:07 +0300
commitda26d69cb1b21d582a81af0cad7342fab6596eed (patch)
tree18c24336e664111ba9c3a5bfedec5c340ec0a19d /CMake/FindEpollShim.cmake
parentUse return value of write (diff)
downloadsway-da26d69cb1b21d582a81af0cad7342fab6596eed.tar.gz
sway-da26d69cb1b21d582a81af0cad7342fab6596eed.tar.zst
sway-da26d69cb1b21d582a81af0cad7342fab6596eed.zip
Fix build on FreeBSD
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf - Add forgotten json-c include path to swaymsg/CMakeLists.txt - Disable -Werror because of assert warnings - Add correct /proc/pid/file path for FreeBSD - Use libepoll-shim on FreeBSD - Only use Linux capabilities on, well, Linux
Diffstat (limited to 'CMake/FindEpollShim.cmake')
-rw-r--r--CMake/FindEpollShim.cmake17
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
8find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
9find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
10
11if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
12 set(EPOLLSHIM_FOUND TRUE)
13endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
14
15include(FindPackageHandleStandardArgs)
16find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
17mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)