Commit Graph

12 Commits

Author SHA1 Message Date
Ihor Dutchak 1e8895d123 add libusb-specific hid_libusb_wrap_sys_device
Rationale: on Android one must use UsbManager, to access any
USB device. As a result, libraries like libusb can only use file descriptors
that are provided by UsbManager.
libusb has an API to use such file descriptors: hid_libusb_wrap_sys_device.
Having hid_libusb_wrap_sys_device currently is the only way to make hidapi
work on Android without root access and without custom Android builds.

Relevant info: https://github.com/libusb/libusb/pull/830/files
2021-05-18 18:00:21 +03:00
Ihor Dutchak f1cd8085ed Explicitly check for trying to install 'EXCLUDE_FROM_ALL' hidapi 2021-03-14 11:11:11 +02:00
Ihor Dutchak 4b8f8814c3 always use libhidapi-libusb.so for libusb backend
Historically, there was no libhidapi.so for libusb backend,
and no good reason not to be consistent with the existing build system.
Also, this will make it easier to enable libusb backend
for platforms like Windows/macOS, where native libhidapi.so already exist.
2021-01-15 14:18:48 +02:00
Ihor Dutchak 0c0f3b8e11 don't search pkg-config libusb, if CMake target usb-1.0 exists 2020-12-11 20:31:26 +02:00
Ihor Dutchak 88b253c344 CMake package: support older version syntax 2020-07-27 15:34:35 +03:00
Ihor Dutchak d1bef57f4c install export order matters 2020-07-27 15:31:39 +03:00
Ihor Dutchak 10469239e9 handle static lib build exports 2020-07-27 15:10:17 +03:00
Ihor Dutchak 5e2436c9eb hidapi::hidapi as INTERFACE IMPORTED instead of ALIAS 2020-07-27 13:28:07 +03:00
Ihor Dutchak 7246840450 add CMake export package installation 2020-07-20 01:13:45 +03:00
Ihor Dutchak a7e4285eb5 add .pc generation for CMake build 2020-07-06 00:29:56 +03:00
Ihor Dutchak 095831f03f CMake: add Darwin build
refactor build system a bit
2020-05-26 22:34:36 +03:00
Ihor Dutchak bf64499b48 add CMake build system
- general build infrastructure, build options;
- libusb/hidraw backends;
- (optionally) hidtest;
2020-05-26 17:51:06 +03:00