diff --git a/CMakeLists.txt b/CMakeLists.txt index a8e80c0..81871cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ project(aquamarine ) include(CTest) +include(CheckIncludeFile) include(GNUInstallDirs) set(PREFIX ${CMAKE_INSTALL_PREFIX}) @@ -44,7 +45,7 @@ file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS "include/*.hpp") add_library(aquamarine SHARED ${SRCFILES}) target_include_directories( aquamarine PUBLIC "./include" - PRIVATE "./src" "./src/include" "./protocols" "./build" + PRIVATE "./src" "./src/include" "./protocols" "${CMAKE_BINARY_DIR}" ) set_target_properties(aquamarine PROPERTIES VERSION ${AQUAMARINE_VERSION} @@ -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}") diff --git a/src/allocator/GBM.cpp b/src/allocator/GBM.cpp index b533e9b..5a3757c 100644 --- a/src/allocator/GBM.cpp +++ b/src/allocator/GBM.cpp @@ -5,6 +5,7 @@ #include "Shared.hpp" #include #include +#include using namespace Aquamarine; using namespace Hyprutils::Memory; diff --git a/src/backend/Session.cpp b/src/backend/Session.cpp index 5ec4b48..9bf0fd9 100644 --- a/src/backend/Session.cpp +++ b/src/backend/Session.cpp @@ -9,6 +9,7 @@ extern "C" { #include #include #include +#include } using namespace Aquamarine; diff --git a/src/backend/Wayland.cpp b/src/backend/Wayland.cpp index 399d5a9..537e12b 100644 --- a/src/backend/Wayland.cpp +++ b/src/backend/Wayland.cpp @@ -8,6 +8,7 @@ #include #include #include +#include using namespace Aquamarine; using namespace Hyprutils::Memory;