Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Commit 34e64c8

Browse files
author
Arkadiy Paronyan
committed
Use hidraw on linux
1 parent c4b24af commit 34e64c8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ libc = "0.2.15"
1818

1919
[build-dependencies]
2020
gcc = "0.3"
21-
pkg-config = "0.3.5"

build.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// *************************************************************************
1919

2020
extern crate gcc;
21-
extern crate pkg_config;
2221

2322
fn main() {
2423
compile();
@@ -27,12 +26,9 @@ fn main() {
2726
#[cfg(target_os = "linux")]
2827
fn compile() {
2928
let mut config = gcc::Config::new();
30-
config.file("etc/hidapi/libusb/hid.c").include("etc/hidapi/hidapi");
31-
let lib = pkg_config::find_library("libusb-1.0").expect("Unable to find libusb-1.0");
32-
for path in lib.include_paths {
33-
config.include(path.to_str().expect("Failed to convert include path to str"));
34-
}
29+
config.file("etc/hidapi/linux/hid.c").include("etc/hidapi/hidapi");
3530
config.compile("libhidapi.a");
31+
println!("cargo:rustc-link-lib=udev");
3632
}
3733

3834
#[cfg(target_os = "windows")]

0 commit comments

Comments
 (0)