From 2616192af39ad916310ed4901f955e94c2be914e Mon Sep 17 00:00:00 2001 From: sephiroth99 Date: Fri, 6 Jan 2017 04:13:51 -0500 Subject: [PATCH] Fix possible undefined reference when linking libusb from externals When on Linux and using libusb from Externals, and with libudev available, an "undefined reference" error message appears at link time. This is due to a wrong define being set in CMake for libusb with libudev. This causes the code for netlink being used instead of the correct code for libudev support. Fix the issue by setting the correct define so the correct libusb code is used. --- Externals/libusb/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Externals/libusb/CMakeLists.txt b/Externals/libusb/CMakeLists.txt index 0faa2ac2f2..fe8c236140 100644 --- a/Externals/libusb/CMakeLists.txt +++ b/Externals/libusb/CMakeLists.txt @@ -48,7 +48,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}") target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}") set(HAVE_LIBUDEV TRUE) - set(USE_LIBUDEV TRUE) + set(USE_UDEV TRUE) else() target_sources(usb PRIVATE libusb/os/linux_netlink.c) endif()