Fix cmake detection of libudev in hidapi broken in #9071

This commit is contained in:
Zopolis4 2022-05-28 11:26:08 +00:00
parent 70bf89fa59
commit b31754980c
No known key found for this signature in database
GPG Key ID: C1117D56FBC82774

View File

@ -9,7 +9,7 @@ if(APPLE)
elseif(MSVC)
target_sources(hidapi PRIVATE windows/hid.c)
else()
find_package(Libudev)
find_package(LIBUDEV)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND LIBUDEV_FOUND)
target_sources(hidapi PRIVATE linux/hid.c)
target_link_libraries(hidapi PRIVATE udev)