USB-HID/UsbHidDevEx/CMakeLists.txt

13 lines
373 B
CMake
Raw Permalink Normal View History

2024-04-21 14:05:38 +08:00
cmake_minimum_required(VERSION 3.10)
project(USBHIDExample)
set(CMAKE_CXX_STANDARD 14)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBUSB1 REQUIRED libusb-1.0)
include_directories(${LIBUSB1_INCLUDE_DIRS})
link_directories(${LIBUSB1_LIBRARY_DIRS})
add_executable(USBHIDExample main.cpp hiddev.cpp)
target_link_libraries(USBHIDExample ${LIBUSB1_LIBRARIES} pthread)