From 407a6d4b3e21a6331cbcb83ecb8a650a7cebd486 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 20 Dec 2017 04:01:32 -0800 Subject: [PATCH] Linux fixes for HID-input --- 3rdparty/hidapi/CMakeLists.txt | 3 +++ src/Input/CMakeLists.txt | 2 +- src/Input/FGLinuxEventInput.hxx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/3rdparty/hidapi/CMakeLists.txt b/3rdparty/hidapi/CMakeLists.txt index aaed35766..c7d95ba83 100644 --- a/3rdparty/hidapi/CMakeLists.txt +++ b/3rdparty/hidapi/CMakeLists.txt @@ -21,6 +21,9 @@ add_library(hidapi STATIC ${HIDAPI_SOURCES} ) +target_link_libraries(hidapi ${UDEV_LIBRARIES}) + + target_include_directories(hidapi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hidapi) target_include_directories(hidapi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/Input/CMakeLists.txt b/src/Input/CMakeLists.txt index 9d8926e96..f3e9cf993 100644 --- a/src/Input/CMakeLists.txt +++ b/src/Input/CMakeLists.txt @@ -73,7 +73,7 @@ endif() if (ENABLE_HID_INPUT) if (COMMAND flightgear_test) set(HID_INPUT_TEST_SOURCES test_hidinput.cxx FGEventInput.cxx - FGCommonInput.cxx FGDEviceConfigurationMap.cxx) + FGCommonInput.cxx FGDeviceConfigurationMap.cxx) flightgear_test(hidinput "${HID_INPUT_TEST_SOURCES}") target_link_libraries(hidinput ${EVENT_INPUT_LIBRARIES} hidapi) diff --git a/src/Input/FGLinuxEventInput.hxx b/src/Input/FGLinuxEventInput.hxx index df151663c..5ee37b64b 100644 --- a/src/Input/FGLinuxEventInput.hxx +++ b/src/Input/FGLinuxEventInput.hxx @@ -42,7 +42,7 @@ struct FGLinuxEventData : public FGEventData { class FGLinuxInputDevice : public FGInputDevice { public: FGLinuxInputDevice(); - FGLinuxInputDevice( std::string name, std::string devname ); + FGLinuxInputDevice( std::string name, std::string devname, std::string aSerial ); virtual ~FGLinuxInputDevice(); virtual void Open();