CMake: support for libusb on GNU/Hurd

Debian builds on hurd-i386 with a variant of libusb.
This commit is contained in:
A. Maitland Bottoms 2016-07-10 06:03:34 -04:00 committed by Steve Markgraf
parent 222517b506
commit b2ee24eff5
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
if(NOT LIBUSB_FOUND) if(NOT LIBUSB_FOUND)
pkg_check_modules (LIBUSB_PKG libusb-1.0) pkg_check_modules (LIBUSB_PKG libusb-1.0 libusb)
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
PATHS PATHS
${LIBUSB_PKG_INCLUDE_DIRS} ${LIBUSB_PKG_INCLUDE_DIRS}
@ -12,7 +12,7 @@ if(NOT LIBUSB_FOUND)
set(libusb1_library_names usb-1.0 libusb-1.0) set(libusb1_library_names usb-1.0 libusb-1.0)
#libusb-1.0 compatible library on freebsd #libusb-1.0 compatible library on freebsd
if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")) if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "GNU"))
list(APPEND libusb1_library_names usb) list(APPEND libusb1_library_names usb)
endif() endif()