From f6dd15477d7267da281d4305386daf3e984ac437 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 16 Jul 2013 12:30:04 -0700 Subject: usb: useful error messages on failed submit --- host/cmake/Modules/FindUSB1.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'host/cmake/Modules') 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) -- cgit v1.2.3