A cross-platform C++23 library with a platform-neutral public API and runtime-selected backends: - Input: Wayland virtual pointer/keyboard (Hyprland, wlroots), libei via the RemoteDesktop portal (GNOME, KDE), uinput, and Win32 SendInput - Capture: ScreenCast portal + PipeWire, and Win32 GDI - Windows: Hyprland IPC and Win32 enumeration - Monitors via wl_output/xdg-output and EnumDisplayMonitors - Optional OpenCV template matching (alvin::vision) Also adds the `alvin` CLI, Catch2 unit tests, install rules with find_package(Alvin) support, API docs (docs/API.md and the Obsidian vault), and README instructions for both ways of consuming the library. Windows backends are written but not yet compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
755 B
CMake
23 lines
755 B
CMake
find_package(Catch2 3 QUIET)
|
|
if(NOT Catch2_FOUND)
|
|
include(FetchContent)
|
|
FetchContent_Declare(Catch2
|
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
|
GIT_TAG v3.7.1)
|
|
FetchContent_MakeAvailable(Catch2)
|
|
endif()
|
|
|
|
add_executable(alvin_tests
|
|
test_core.cpp
|
|
test_json.cpp)
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
target_sources(alvin_tests PRIVATE test_linux.cpp)
|
|
target_link_libraries(alvin_tests PRIVATE PkgConfig::XKBCOMMON)
|
|
endif()
|
|
# Tests exercise internal helpers too, so they see the private source tree.
|
|
target_include_directories(alvin_tests PRIVATE ${PROJECT_SOURCE_DIR}/src)
|
|
target_link_libraries(alvin_tests PRIVATE alvin::alvin Catch2::Catch2WithMain)
|
|
|
|
include(Catch)
|
|
catch_discover_tests(alvin_tests)
|