diff options
author | Josh Blum <josh@joshknows.com> | 2013-07-16 12:30:04 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2013-07-16 12:30:04 -0700 |
commit | f6dd15477d7267da281d4305386daf3e984ac437 (patch) | |
tree | af2419349835fbda7826cdc6fbfe5e204b9eb61e /host/cmake/Modules/FindUSB1.cmake | |
parent | 4677db78f1d555e604ff8a12fc7e36ecdb1e3c2d (diff) | |
download | uhd-f6dd15477d7267da281d4305386daf3e984ac437.tar.gz uhd-f6dd15477d7267da281d4305386daf3e984ac437.tar.bz2 uhd-f6dd15477d7267da281d4305386daf3e984ac437.zip |
usb: useful error messages on failed submit
Diffstat (limited to 'host/cmake/Modules/FindUSB1.cmake')
-rw-r--r-- | host/cmake/Modules/FindUSB1.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/host/cmake/Modules/FindUSB1.cmake b/host/cmake/Modules/FindUSB1.cmake index a1ab4ca90..a494e1350 100644 --- a/host/cmake/Modules/FindUSB1.cmake +++ b/host/cmake/Modules/FindUSB1.cmake @@ -40,12 +40,17 @@ endif() if(LIBUSB_LIBRARIES) set(CMAKE_REQUIRED_LIBRARIES ${LIBUSB_LIBRARIES}) endif() -CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) +CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) if(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1") endif(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) +CHECK_FUNCTION_EXISTS("libusb_error_name" HAVE_LIBUSB_ERROR_NAME) +if(HAVE_LIBUSB_ERROR_NAME) + list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_ERROR_NAME=1") +endif(HAVE_LIBUSB_ERROR_NAME) + include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS) MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES) |