diff --git a/host/cmake/modules/FindLibUSB.cmake b/host/cmake/modules/FindLibUSB.cmake index e8211384..ce6bb546 100644 --- a/host/cmake/modules/FindLibUSB.cmake +++ b/host/cmake/modules/FindLibUSB.cmake @@ -41,6 +41,10 @@ set(LIBUSB_PATH find_package ( PkgConfig ) if ( PKG_CONFIG_FOUND ) pkg_check_modules ( PKGCONFIG_LIBUSB libusb-1.0 ) +else ( PKG_CONFIG_FOUND ) + if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + message ( WARNING "Could not find pkg-config, which is a build dependency. If libusb-1.0 can't be found, please install pkg-config." ) + endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) endif ( PKG_CONFIG_FOUND ) if ( PKGCONFIG_LIBUSB_FOUND ) @@ -118,5 +122,5 @@ if ( LIBUSB_FOUND ) check_library_exists ( "${usb_LIBRARY}" libusb_handle_events_timeout_completed "" LIBUSB_VERSION_1.0 ) check_library_exists ( "${usb_LIBRARY}" libusb_get_version "" LIBUSB_VERSION_1.0 ) else () - message ( FATAL_ERROR "libusb-1.0 not found - is it installed? If you're using a binary distribution, try setting -DLIBUSB_PATH=." ) + message ( FATAL_ERROR "libusb-1.0 not found - is it installed? If you're using a binary distribution, try setting -DLIBUSB_PATH=. If pkg-config wasn't found, try installing it." ) endif ( LIBUSB_FOUND )