Debian-based distributions don't include the CMake module.
This commit is contained in:
parent
c8f3b9ba38
commit
c6f47a0981
@ -41,13 +41,16 @@ pkg_check_modules (libusb libusb-1.0)
|
||||
|
||||
# On MSYS2, the CMake package cannot link statically, but pkg-config can.
|
||||
# On macOS, we explicitly want to use the CMake package.
|
||||
if (WIN32)
|
||||
pkg_search_module (hidapi hidapi hidapi-hidraw hidapi-libusb)
|
||||
else ()
|
||||
find_package (hidapi)
|
||||
if (NOT WIN32)
|
||||
find_package (hidapi QUIET)
|
||||
if (hidapi_FOUND)
|
||||
set (hidapi_INCLUDE_DIRS)
|
||||
set (hidapi_LIBRARY_DIRS)
|
||||
set (hidapi_LIBRARIES hidapi::hidapi)
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT hidapi_FOUND)
|
||||
pkg_search_module (hidapi hidapi hidapi-hidraw hidapi-libusb)
|
||||
endif ()
|
||||
|
||||
option (WITH_LIBUSB "Compile with libusb-based utilities" ${libusb_FOUND})
|
||||
|
Loading…
x
Reference in New Issue
Block a user