Include timers when using cmake (#29)
authorCharlie Birks <admin@daftgames.net>
Tue, 13 Sep 2016 00:03:40 -0700
changeset 103216564d3e3c5f6
parent 10320 f2e6dc590643
child 10322 6167a989223c
Include timers when using cmake (#29)
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Tue Sep 13 00:03:39 2016 -0700
     1.2 +++ b/CMakeLists.txt	Tue Sep 13 00:03:40 2016 -0700
     1.3 @@ -796,6 +796,16 @@
     1.4      set(SOURCE_FILES ${SOURCE_FILES} ${EM_POWER_SOURCES})
     1.5      set(HAVE_SDL_POWER TRUE)
     1.6    endif()
     1.7 +  if(SDL_TIMERS)
     1.8 +    set(SDL_TIMER_UNIX 1)
     1.9 +    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
    1.10 +    set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
    1.11 +    set(HAVE_SDL_TIMERS TRUE)
    1.12 +
    1.13 +    if(CLOCK_GETTIME)
    1.14 +      set(HAVE_CLOCK_GETTIME 1)
    1.15 +    endif()
    1.16 +  endif()
    1.17    if(SDL_VIDEO)
    1.18      set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
    1.19      file(GLOB EM_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/emscripten/*.c)