diff --git a/cmake/compile_definitions/linux.cmake b/cmake/compile_definitions/linux.cmake index b2f524d68d7..e07c2a55d8f 100644 --- a/cmake/compile_definitions/linux.cmake +++ b/cmake/compile_definitions/linux.cmake @@ -225,17 +225,21 @@ endif() if(${SUNSHINE_USE_LEGACY_INPUT}) # TODO: Remove this legacy option after the next stable release list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/input/legacy_input.cpp") else() - if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY) - # These two needs to be set before adding the inputtino subdirectory in order for them to be picked up - set(LIBEVDEV_CUSTOM_INCLUDE_DIR ${EVDEV_INCLUDE_DIR}) - set(LIBEVDEV_CUSTOM_LIBRARY ${EVDEV_LIBRARY}) - endif () + # These need to be set before adding the inputtino subdirectory in order for them to be picked up + set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}") + set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}") + add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/inputtino") list(APPEND SUNSHINE_EXTERNAL_LIBRARIES inputtino::libinputtino) file(GLOB_RECURSE INPUTTINO_SOURCES ${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.h ${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.cpp) list(APPEND PLATFORM_TARGET_FILES ${INPUTTINO_SOURCES}) + + # build libevdev before the libinputtino target + if(EXTERNAL_PROJECT_LIBEVDEV_USED) + add_dependencies(libinputtino libevdev) + endif() endif() list(APPEND PLATFORM_TARGET_FILES diff --git a/cmake/dependencies/libevdev_Sunshine.cmake b/cmake/dependencies/libevdev_Sunshine.cmake index 86c8a0099fd..84fb6677fd2 100644 --- a/cmake/dependencies/libevdev_Sunshine.cmake +++ b/cmake/dependencies/libevdev_Sunshine.cmake @@ -38,6 +38,9 @@ else() endif() if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY) + message(STATUS "Found libevdev library: ${EVDEV_LIBRARY}") + message(STATUS "Found libevdev include directory: ${EVDEV_INCLUDE_DIR}") + include_directories(SYSTEM ${EVDEV_INCLUDE_DIR}) list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY}) else() diff --git a/cmake/macros/common.cmake b/cmake/macros/common.cmake index ad780f8675e..53a3c694afe 100644 --- a/cmake/macros/common.cmake +++ b/cmake/macros/common.cmake @@ -27,17 +27,3 @@ macro(find_package) # cmake-lint: disable=C0103 _find_package(${ARGV}) endif() endmacro() - -# override pkg_check_modules function -macro(pkg_check_modules) # cmake-lint: disable=C0103 - string(TOLOWER "${ARGV0}" ARGV0_LOWER) - if( - (("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR - (("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED) - ) - # Do nothing, as the package has already been fetched - else() - # Call the original pkg_check_modules function - _pkg_check_modules(${ARGV}) - endif() -endmacro() diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 00fb06597a6..dbb028295bc 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -64,10 +64,6 @@ def install -DSUNSHINE_ENABLE_TRAY=OFF -DTESTS_ENABLE_PYTHON_TESTS=OFF ] - # On Linux we have to first build the evdev target manually since the library is not available on homebrew - on_linux do - system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "--target", "libevdev" - end system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args cd "build" do diff --git a/third-party/inputtino b/third-party/inputtino index 68f51dd1fe9..2739465690c 160000 --- a/third-party/inputtino +++ b/third-party/inputtino @@ -1 +1 @@ -Subproject commit 68f51dd1fe9d2ac74c2800fe43f0c065b648efb6 +Subproject commit 2739465690c7bbd1a27cb4e285ff08f486a208e3