CMakeLists.txt
changeset 12149 e037e9c2bc00
parent 12130 24142c5073a4
child 12171 26a817fe1b07
equal deleted inserted replaced
12148:bb47da8eb0d7 12149:e037e9c2bc00
   265     set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
   265     set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
   266 endif()
   266 endif()
   267 
   267 
   268 set(SDL_SUBSYSTEMS
   268 set(SDL_SUBSYSTEMS
   269     Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
   269     Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
   270     File Loadso CPUinfo Filesystem Dlopen)
   270     File Loadso CPUinfo Filesystem Dlopen Sensor)
   271 foreach(_SUB ${SDL_SUBSYSTEMS})
   271 foreach(_SUB ${SDL_SUBSYSTEMS})
   272   string(TOUPPER ${_SUB} _OPT)
   272   string(TOUPPER ${_SUB} _OPT)
   273   if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
   273   if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
   274     set(SDL_${_OPT}_ENABLED_BY_DEFAULT ON)
   274     set(SDL_${_OPT}_ENABLED_BY_DEFAULT ON)
   275   endif()
   275   endif()
   853     set(SDL_TIMER_UNIX 1)
   853     set(SDL_TIMER_UNIX 1)
   854     file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
   854     file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
   855     set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
   855     set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
   856     set(HAVE_SDL_TIMERS TRUE)
   856     set(HAVE_SDL_TIMERS TRUE)
   857   endif()
   857   endif()
       
   858   if(SDL_SENSOR)
       
   859     set(SDL_SENSOR_ANDROID 1)
       
   860     set(HAVE_SDL_SENSORS TRUE)
       
   861     file(GLOB ANDROID_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/android/*.c)
       
   862     set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_SENSOR_SOURCES})
       
   863   endif()
   858   if(SDL_VIDEO)
   864   if(SDL_VIDEO)
   859     set(SDL_VIDEO_DRIVER_ANDROID 1)
   865     set(SDL_VIDEO_DRIVER_ANDROID 1)
   860     file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
   866     file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
   861     set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
   867     set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
   862     set(HAVE_SDL_VIDEO TRUE)
   868     set(HAVE_SDL_VIDEO TRUE)
  1568 endif()
  1574 endif()
  1569 if(NOT HAVE_SDL_FILESYSTEM)
  1575 if(NOT HAVE_SDL_FILESYSTEM)
  1570   set(SDL_FILESYSTEM_DISABLED 1)
  1576   set(SDL_FILESYSTEM_DISABLED 1)
  1571   file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/dummy/*.c)
  1577   file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/dummy/*.c)
  1572   set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
  1578   set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
       
  1579 endif()
       
  1580 if(NOT HAVE_SDL_SENSORS)
       
  1581   set(SDL_SENSORS_DISABLED 1)
       
  1582   file(GLOB SENSORS_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/dummy/*.c)
       
  1583   set(SOURCE_FILES ${SOURCE_FILES} ${SENSORS_SOURCES})
  1573 endif()
  1584 endif()
  1574 
  1585 
  1575 # We always need to have threads and timers around
  1586 # We always need to have threads and timers around
  1576 if(NOT HAVE_SDL_THREADS)
  1587 if(NOT HAVE_SDL_THREADS)
  1577   set(SDL_THREADS_DISABLED 1)
  1588   set(SDL_THREADS_DISABLED 1)