From 322d2ea2756a05bddd18d2908e42c5c43199b859 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Sun, 11 Feb 2024 20:55:12 +0000 Subject: [PATCH] fix: cmake compilation issues --- .github/workflows/linux-build-test.yml | 4 ++-- src/core/src/platforms/linux/uinput/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 5 ++--- tests/testJoypads.cpp | 0 4 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 tests/testJoypads.cpp diff --git a/.github/workflows/linux-build-test.yml b/.github/workflows/linux-build-test.yml index 38fac0d0..00df543a 100644 --- a/.github/workflows/linux-build-test.yml +++ b/.github/workflows/linux-build-test.yml @@ -57,7 +57,7 @@ jobs: -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_EXTENSIONS=OFF \ -DCMAKE_CXX_STANDARD=17 \ - -DTEST_UINPUT=OFF \ + -DTEST_VIRTUAL_INPUT=OFF \ -DTEST_LIBINPUT=OFF \ -DTEST_DOCKER=ON \ -DLINK_RUST_WAYLAND=ON \ @@ -152,7 +152,7 @@ jobs: -DCMAKE_CXX_EXTENSIONS=OFF \ -DBUILD_SHARED_LIBS=${{ matrix.shared }} \ -DCATCH_DEVELOPMENT_BUILD=ON \ - -DTEST_UINPUT=OFF \ + -DTEST_VIRTUAL_INPUT=OFF \ -DTEST_LIBINPUT=OFF \ -DTEST_DOCKER=OFF \ -DLINK_RUST_WAYLAND=ON \ diff --git a/src/core/src/platforms/linux/uinput/CMakeLists.txt b/src/core/src/platforms/linux/uinput/CMakeLists.txt index a941f3bf..21a9c30b 100644 --- a/src/core/src/platforms/linux/uinput/CMakeLists.txt +++ b/src/core/src/platforms/linux/uinput/CMakeLists.txt @@ -17,7 +17,7 @@ if (UNIX AND NOT APPLE) pkg_check_modules(LIBUDEV REQUIRED IMPORTED_TARGET libudev) target_link_libraries(wolf_uinput PUBLIC PkgConfig::LIBUDEV) target_sources(wolf_uinput - PUBLIC "keyboard.hpp" "uinput.hpp" + PUBLIC "uinput.hpp" PRIVATE ${PRIVATE_LIST}) endif () diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 81e61da4..a5daf7cc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,8 +29,8 @@ if (UNIX AND NOT APPLE) list(APPEND SRC_LIST "platforms/linux/nvidia.cpp") endif () - option(TEST_LIBINPUT "Enable libinput test" ON) - if (TEST_LIBINPUT) + option(TEST_VIRTUAL_INPUT "Enable libinput test" ON) + if (TEST_VIRTUAL_INPUT) find_package(PkgConfig) pkg_check_modules(LIBINPUT REQUIRED IMPORTED_TARGET libinput) target_link_libraries(wolftests PRIVATE PkgConfig::LIBINPUT) @@ -41,7 +41,6 @@ if (UNIX AND NOT APPLE) endif () list(APPEND SRC_LIST "platforms/linux/libinput.h" - "platforms/linux/testLibinput.cpp" "platforms/linux/input.cpp") endif () endif () diff --git a/tests/testJoypads.cpp b/tests/testJoypads.cpp new file mode 100644 index 00000000..e69de29b