mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
cmake: add epoll-shim for some BSDs
ld: error: undefined reference due to --no-allow-shlib-undefined: timerfd_create >>> referenced by libaquamarine.so.0.1.0
This commit is contained in:
parent
92b4b01501
commit
946c756414
1 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,7 @@ project(aquamarine
|
|||
)
|
||||
|
||||
include(CTest)
|
||||
include(CheckIncludeFile)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
|
@ -52,6 +53,12 @@ set_target_properties(aquamarine PROPERTIES
|
|||
)
|
||||
target_link_libraries(aquamarine PkgConfig::deps)
|
||||
|
||||
check_include_file("sys/timerfd.h" HAS_TIMERFD)
|
||||
pkg_check_modules(epoll IMPORTED_TARGET epoll-shim)
|
||||
if(NOT HAS_TIMERFD AND epoll_FOUND)
|
||||
target_link_libraries(aquamarine PkgConfig::epoll)
|
||||
endif()
|
||||
|
||||
# Protocols
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}")
|
||||
|
|
Loading…
Reference in a new issue