CMake: Enable missing timer subsystem on Mac OS X and Haiku.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 28 Jan 2014 00:05:23 -0500
changeset 8133 f24acf2403c0
parent 8132 06922987b6ff
child 8134 7c9192be51a7
CMake: Enable missing timer subsystem on Mac OS X and Haiku.
CMakeLists.txt
--- a/CMakeLists.txt	Mon Jan 27 13:43:04 2014 -0800
+++ b/CMakeLists.txt	Tue Jan 28 00:05:23 2014 -0500
@@ -963,6 +963,13 @@
     set(SDL_FRAMEWORK_IOKIT 1)
   endif()
 
+  if(SDL_TIMERS)
+    set(SDL_TIMER_UNIX 1)
+    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+    set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
+    set(HAVE_SDL_TIMERS TRUE)
+  endif(SDL_TIMERS)
+
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_COCOA 1)
     file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m)
@@ -1024,6 +1031,13 @@
     set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
 
+    if(SDL_TIMERS)
+      set(SDL_TIMER_HAIKU 1)
+      file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
+      set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
+      set(HAVE_SDL_TIMERS TRUE)
+    endif(SDL_TIMERS)
+
     if(VIDEO_OPENGL)
       # TODO: Use FIND_PACKAGE(OpenGL) instead
       set(SDL_VIDEO_OPENGL 1)