mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-05-04 21:22:20 +00:00
cmake: find libudev library so it gets priority
This commit is contained in:
parent
a2611edcf3
commit
660cec69b1
|
@ -511,6 +511,7 @@ set_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON)
|
||||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" OFF SDL_HIDAPI OFF)
|
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" OFF SDL_HIDAPI OFF)
|
||||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
||||||
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||||
|
set_option(SDL_LIBUDEV "Enable libudev support" ON)
|
||||||
set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF)
|
set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF)
|
||||||
option_string(SDL_VENDOR_INFO "Vendor name and/or version to add to SDL_REVISION" "")
|
option_string(SDL_VENDOR_INFO "Vendor name and/or version to add to SDL_REVISION" "")
|
||||||
set_option(SDL_CCACHE "Use Ccache to speed up build" ON)
|
set_option(SDL_CCACHE "Use Ccache to speed up build" ON)
|
||||||
|
@ -1522,7 +1523,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||||
set(SDL_INPUT_WSCONS 1)
|
set(SDL_INPUT_WSCONS 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_include_file("libudev.h" HAVE_LIBUDEV_H)
|
CheckLibUDev()
|
||||||
check_include_file("sys/inotify.h" HAVE_SYS_INOTIFY_H)
|
check_include_file("sys/inotify.h" HAVE_SYS_INOTIFY_H)
|
||||||
check_symbol_exists(inotify_init "sys/inotify.h" HAVE_INOTIFY_INIT)
|
check_symbol_exists(inotify_init "sys/inotify.h" HAVE_INOTIFY_INIT)
|
||||||
check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1)
|
check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1)
|
||||||
|
|
|
@ -1294,3 +1294,16 @@ macro(CheckKMSDRM)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
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()
|
||||||
|
|
|
@ -360,6 +360,7 @@
|
||||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||||
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
|
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
|
||||||
|
#cmakedefine SDL_UDEV_DYNAMIC @SDL_UDEV_DYNAMIC@
|
||||||
|
|
||||||
/* Enable various sensor drivers */
|
/* Enable various sensor drivers */
|
||||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||||
|
|
Loading…
Reference in a new issue