CMakeLists.txt
changeset 8032 e2096994e8b8
parent 8031 edf58197a910
child 8056 abd9434c5d3e
equal deleted inserted replaced
8031:edf58197a910 8032:e2096994e8b8
   649         #ifndef EVIOCGNAME
   649         #ifndef EVIOCGNAME
   650         #error EVIOCGNAME() ioctl not available
   650         #error EVIOCGNAME() ioctl not available
   651         #endif
   651         #endif
   652         int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
   652         int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS)
   653 
   653 
       
   654     check_c_source_compiles("
       
   655         #include <linux/kd.h>
       
   656         #include <linux/keyboard.h>
       
   657 
       
   658         int main(int argc, char **argv) 
       
   659         {
       
   660             struct kbentry kbe;
       
   661             kbe.kb_table = KG_CTRL;
       
   662             ioctl(0, KDGKBENT, &kbe);
       
   663         }" HAVE_INPUT_KD)
       
   664 
   654     file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
   665     file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
   655     set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
   666     set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
   656 
   667 
   657     if(HAVE_INPUT_EVENTS)
   668     if(HAVE_INPUT_EVENTS)
   658       set(SDL_INPUT_LINUXEV 1)
   669       set(SDL_INPUT_LINUXEV 1)
   662       set(SDL_HAPTIC_LINUX 1)
   673       set(SDL_HAPTIC_LINUX 1)
   663       file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/linux/*.c)
   674       file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/linux/*.c)
   664       set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
   675       set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
   665       set(HAVE_SDL_HAPTIC TRUE)
   676       set(HAVE_SDL_HAPTIC TRUE)
   666     endif(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
   677     endif(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
       
   678 
       
   679     if(HAVE_INPUT_KD)
       
   680       set(SDL_INPUT_LINUXKD 1)
       
   681     endif(HAVE_INPUT_KD)
   667 
   682 
   668     check_include_file("libudev.h" HAVE_LIBUDEV_H)
   683     check_include_file("libudev.h" HAVE_LIBUDEV_H)
   669 
   684 
   670     # !!! FIXME: this needs pkg-config to find the include path, I think.
   685     # !!! FIXME: this needs pkg-config to find the include path, I think.
   671     check_include_file("dbus/dbus.h" HAVE_DBUS_DBUS_H)
   686     check_include_file("dbus/dbus.h" HAVE_DBUS_DBUS_H)