build(cmake) properly find evdev (#2176)
This commit is contained in:
@@ -120,6 +120,17 @@ elseif(NOT LIBDRM_FOUND)
|
|||||||
message(WARNING "Missing libcap")
|
message(WARNING "Missing libcap")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# evdev
|
||||||
|
pkg_check_modules(PC_EVDEV libevdev REQUIRED)
|
||||||
|
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
|
||||||
|
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
|
||||||
|
find_library(EVDEV_LIBRARY
|
||||||
|
NAMES evdev libevdev)
|
||||||
|
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
|
||||||
|
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
|
||||||
|
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
# vaapi
|
# vaapi
|
||||||
if(${SUNSHINE_ENABLE_VAAPI})
|
if(${SUNSHINE_ENABLE_VAAPI})
|
||||||
find_package(Libva)
|
find_package(Libva)
|
||||||
@@ -241,13 +252,11 @@ list(APPEND PLATFORM_TARGET_FILES
|
|||||||
list(APPEND PLATFORM_LIBRARIES
|
list(APPEND PLATFORM_LIBRARIES
|
||||||
Boost::dynamic_linking
|
Boost::dynamic_linking
|
||||||
dl
|
dl
|
||||||
evdev
|
|
||||||
numa
|
numa
|
||||||
pulse
|
pulse
|
||||||
pulse-simple)
|
pulse-simple)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
SYSTEM
|
SYSTEM
|
||||||
/usr/include/libevdev-1.0
|
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
|
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
|
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
|
||||||
|
|||||||
@@ -325,7 +325,6 @@ modules:
|
|||||||
append-path: /usr/lib/sdk/node18/bin
|
append-path: /usr/lib/sdk/node18/bin
|
||||||
build-args:
|
build-args:
|
||||||
- --share=network
|
- --share=network
|
||||||
cxxflags: -I${C_INCLUDE_PATH}/libevdev-1.0
|
|
||||||
env:
|
env:
|
||||||
npm_config_nodedir: /usr/lib/sdk/node18
|
npm_config_nodedir: /usr/lib/sdk/node18
|
||||||
NPM_CONFIG_LOGLEVEL: info
|
NPM_CONFIG_LOGLEVEL: info
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
#include <linux/uinput.h>
|
#include <linux/uinput.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include <libevdev/libevdev-uinput.h>
|
#include <libevdev/libevdev-uinput.h>
|
||||||
#include <libevdev/libevdev.h>
|
#include <libevdev/libevdev.h>
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SUNSHINE_BUILD_X11
|
#ifdef SUNSHINE_BUILD_X11
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user