Depend on epoll-shim on FreeBSD/DragonFly

They do not natively support epoll(2) but require a library shim for it.

Signed-off-by: Tobias Kortkamp <t@tobik.me>
This commit is contained in:
Tobias Kortkamp 2019-04-23 11:45:13 +02:00
parent 312a606d54
commit 2ca0625a70
No known key found for this signature in database
GPG Key ID: F4815C5F893E655D

View File

@ -3,11 +3,15 @@ FIND_PACKAGE(Cairo REQUIRED)
FIND_PACKAGE(Pango REQUIRED)
FIND_PACKAGE(XKBCommon REQUIRED)
if (CMAKE_SYSTEM_NAME MATCHES "DragonFly" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
PKG_CHECK_MODULES(EPOLL_SHIM REQUIRED epoll-shim)
endif ()
INCLUDE(Wayland)
WAYLAND_ADD_PROTOCOL_CLIENT(proto-layer-shell "wlr-layer-shell-unstable-v1.xml" layer-shell)
WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell "xdg-shell.xml" xdg-shell)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${WAYLAND_CLIENT_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIR} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${WAYLAND_CLIENT_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIR} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${EPOLL_SHIM_INCLUDE_DIRS})
ADD_LIBRARY(bemenu-renderer-wayland SHARED wayland.c registry.c window.c ${proto-layer-shell} ${proto-xdg-shell})
SET_TARGET_PROPERTIES(bemenu-renderer-wayland PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-wayland ${BEMENU_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES} ${XKBCOMMON_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} m)
TARGET_LINK_LIBRARIES(bemenu-renderer-wayland ${BEMENU_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES} ${XKBCOMMON_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} ${EPOLL_SHIM_LIBRARIES} m)
INSTALL(TARGETS bemenu-renderer-wayland DESTINATION "${CMAKE_INSTALL_LIBDIR}/bemenu")