CMakeLists.txt
changeset 9731 a8140c580b85
parent 9717 45a632fd9d83
child 9758 cf4d3ee2b37b
     1.1 --- a/CMakeLists.txt	Fri Jun 12 21:10:31 2015 +0200
     1.2 +++ b/CMakeLists.txt	Sat Jun 13 10:47:55 2015 -0700
     1.3 @@ -1031,14 +1031,19 @@
     1.4      set(HAVE_SDL_JOYSTICK TRUE)
     1.5  
     1.6      if(SDL_HAPTIC)
     1.7 -      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/windows/*.c)
     1.8 +      if(HAVE_DINPUT_H OR HAVE_XINPUT_H)
     1.9 +        file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/windows/*.c)
    1.10 +        if(HAVE_DINPUT_H)
    1.11 +          set(SDL_HAPTIC_DINPUT 1)
    1.12 +        endif()
    1.13 +        if(HAVE_XINPUT_H)
    1.14 +          set(SDL_HAPTIC_XINPUT 1)
    1.15 +        endif()
    1.16 +      else()
    1.17 +        file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
    1.18 +        set(SDL_HAPTIC_DUMMY 1)
    1.19 +      endif()
    1.20        set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
    1.21 -      if(HAVE_DINPUT_H)
    1.22 -        set(SDL_HAPTIC_DINPUT 1)
    1.23 -      endif()
    1.24 -      if(HAVE_XINPUT_H)
    1.25 -        set(SDL_HAPTIC_XINPUT 1)
    1.26 -      endif()
    1.27        set(HAVE_SDL_HAPTIC TRUE)
    1.28      endif()
    1.29    endif()