From 2ca0625a70245e8a0aa1cda2be7c367c4fd62949 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Tue, 23 Apr 2019 11:45:13 +0200 Subject: [PATCH] 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 --- lib/renderers/wayland/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/renderers/wayland/CMakeLists.txt b/lib/renderers/wayland/CMakeLists.txt index 8246908..e4c473e 100644 --- a/lib/renderers/wayland/CMakeLists.txt +++ b/lib/renderers/wayland/CMakeLists.txt @@ -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")