depends: remove eudev

This commit is contained in:
tobtoht 2025-01-04 04:31:50 +01:00
parent eaf9f98930
commit e7e00df831
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
6 changed files with 13 additions and 35 deletions

View file

@ -41,13 +41,17 @@ if(HIDAPI_FOUND)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUSB-1.0_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
# Hidapi is built without the udev backend in depends
if (NOT DEPENDS)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
endif()
endif()
else()
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")