cmake: find libudev library so it gets priority

This commit is contained in:
Anonymous Maarten
2022-11-25 02:57:00 +01:00
committed by Anonymous Maarten
parent 1bbff6596c
commit d0e14008b5
3 changed files with 16 additions and 1 deletions

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()