build(cmake) properly find evdev (#2176)
This commit is contained in:
parent
c6f94e93e0
commit
8a7a6c48f8
3 changed files with 13 additions and 3 deletions
|
|
@ -120,6 +120,17 @@ elseif(NOT LIBDRM_FOUND)
|
|||
message(WARNING "Missing libcap")
|
||||
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
|
||||
if(${SUNSHINE_ENABLE_VAAPI})
|
||||
find_package(Libva)
|
||||
|
|
@ -241,13 +252,11 @@ list(APPEND PLATFORM_TARGET_FILES
|
|||
list(APPEND PLATFORM_LIBRARIES
|
||||
Boost::dynamic_linking
|
||||
dl
|
||||
evdev
|
||||
numa
|
||||
pulse
|
||||
pulse-simple)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
/usr/include/libevdev-1.0
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
|
||||
|
|
|
|||
|
|
@ -325,7 +325,6 @@ modules:
|
|||
append-path: /usr/lib/sdk/node18/bin
|
||||
build-args:
|
||||
- --share=network
|
||||
cxxflags: -I${C_INCLUDE_PATH}/libevdev-1.0
|
||||
env:
|
||||
npm_config_nodedir: /usr/lib/sdk/node18
|
||||
NPM_CONFIG_LOGLEVEL: info
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@
|
|||
#include <linux/uinput.h>
|
||||
#include <poll.h>
|
||||
|
||||
extern "C" {
|
||||
#include <libevdev/libevdev-uinput.h>
|
||||
#include <libevdev/libevdev.h>
|
||||
}
|
||||
|
||||
#ifdef SUNSHINE_BUILD_X11
|
||||
#include <X11/Xutil.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue