CMakeLists.txt: switch prio between hidapi-libusb and hidapi-hidraw: fix detection issue on WSL2 with cmsisdap (#413)

This commit is contained in:
Gwenhael Goavec-Merou 2024-04-14 08:57:12 +02:00
parent 99147efa27
commit 2535c28e04
1 changed files with 3 additions and 3 deletions

View File

@ -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)