Merge pull request #10705 from Zopolis4/cmake

Fixes for cmake shared library detection.
This commit is contained in:
JMC47 2022-09-22 21:58:53 -04:00 committed by GitHub
commit 08f78b1445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)