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
1 changed files with 1 additions and 1 deletions

View File

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