diff --git a/CMakeLists.txt b/CMakeLists.txt index e39b72c..44d1689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,14 @@ message(STATUS "Checking deps...") add_subdirectory(subprojects/sdbus-cpp) add_subdirectory(hyprland-share-picker) +find_package(Threads REQUIRED) + find_package(PkgConfig REQUIRED) pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-client wayland-protocols libpipewire-0.3 libspa-0.2 libdrm gbm) file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp") add_executable(xdg-desktop-portal-hyprland ${SRCFILES}) -target_link_libraries(xdg-desktop-portal-hyprland PRIVATE rt sdbus-c++ PkgConfig::deps) +target_link_libraries(xdg-desktop-portal-hyprland PRIVATE rt sdbus-c++ Threads::Threads PkgConfig::deps) # protocols find_program(WaylandScanner NAMES wayland-scanner) diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index da05ee6..353c8f0 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -1,5 +1,6 @@ #include "MiscFunctions.hpp" #include +#include #include "../helpers/Log.hpp" std::string execAndGet(const char* cmd) { diff --git a/src/meson.build b/src/meson.build index 444d3bd..c3d3735 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,6 +8,7 @@ executable('xdg-desktop-portal-hyprland', dependency('libdrm'), dependency('libpipewire-0.3'), dependency('sdbus-c++'), + dependency('threads'), dependency('wayland-client'), ], include_directories: inc,