cmake: find libudev library so it gets priority

This commit is contained in:
Anonymous Maarten 2022-11-25 02:57:00 +01:00
parent a2611edcf3
commit 660cec69b1
3 changed files with 16 additions and 1 deletions

View file

@ -1294,3 +1294,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()