cmake: find libudev library so it gets priority

This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2022-11-25 21:36:53 +01:00
1 parent 1bbff6596c
commit d0e14008b5
3 files changed
+16 -1

No files matched your search

+13
View File
@@ -1139,3 +1139,16 @@ macro(CheckKMSDRM)
endif()
endif()
endmacro()
macro(CheckLibUDev)
if(SDL_LIBUDEV)
check_include_file("libudev.h" have_libudev_header)
if(have_libudev_header)
set(HAVE_LIBUDEV_H TRUE)
FindLibraryAndSONAME(udev)
if(UDEV_LIB_SONAME)
set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"")
endif()
endif()
endif()
endmacro()