mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixes #2271, Add KD detection under CMake by Scott Percival
This commit is contained in:
parent
96fe749fc7
commit
c343eab67a
@ -651,6 +651,17 @@ if(UNIX AND NOT APPLE)
|
|||||||
#endif
|
#endif
|
||||||
int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
|
int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
|
||||||
|
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <linux/kd.h>
|
||||||
|
#include <linux/keyboard.h>
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
struct kbentry kbe;
|
||||||
|
kbe.kb_table = KG_CTRL;
|
||||||
|
ioctl(0, KDGKBENT, &kbe);
|
||||||
|
}" HAVE_INPUT_KD)
|
||||||
|
|
||||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||||
|
|
||||||
@ -665,6 +676,10 @@ if(UNIX AND NOT APPLE)
|
|||||||
set(HAVE_SDL_HAPTIC TRUE)
|
set(HAVE_SDL_HAPTIC TRUE)
|
||||||
endif(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
|
endif(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
|
||||||
|
|
||||||
|
if(HAVE_INPUT_KD)
|
||||||
|
set(SDL_INPUT_LINUXKD 1)
|
||||||
|
endif(HAVE_INPUT_KD)
|
||||||
|
|
||||||
check_include_file("libudev.h" HAVE_LIBUDEV_H)
|
check_include_file("libudev.h" HAVE_LIBUDEV_H)
|
||||||
|
|
||||||
# !!! FIXME: this needs pkg-config to find the include path, I think.
|
# !!! FIXME: this needs pkg-config to find the include path, I think.
|
||||||
|
@ -215,6 +215,7 @@
|
|||||||
|
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||||
|
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||||
|
Loading…
Reference in New Issue
Block a user