From 2535c28e0443553660c15975a0da52aa9d6c7467 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sun, 14 Apr 2024 08:57:12 +0200 Subject: [PATCH] CMakeLists.txt: switch prio between hidapi-libusb and hidapi-hidraw: fix detection issue on WSL2 with cmsisdap (#413) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c481b3..8ad3121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,10 +48,10 @@ if (USE_PKGCONFIG) find_package(PkgConfig REQUIRED) pkg_check_modules(LIBFTDI REQUIRED libftdi1) pkg_check_modules(LIBUSB REQUIRED libusb-1.0) - pkg_check_modules(HIDAPI hidapi-hidraw) - # if hidraw not found try with libusb + pkg_check_modules(HIDAPI hidapi-libusb) + # if libusb not found try with hidraw if (NOT HIDAPI_FOUND) - pkg_check_modules(HIDAPI hidapi-libusb) + pkg_check_modules(HIDAPI hidapi-hidraw) endif() if (NOT HIDAPI_FOUND) pkg_check_modules(HIDAPI hidapi)