mirror of https://github.com/encounter/SDL.git
Fixed bug 3009 - Cannot compile SDL2 on Windows
CMakeLists.txt was missing handling for running CMake with -DDIRECTX=0
This commit is contained in:
parent
d8c2b36c21
commit
aee0552229
|
@ -1031,14 +1031,19 @@ elseif(WINDOWS)
|
||||||
set(HAVE_SDL_JOYSTICK TRUE)
|
set(HAVE_SDL_JOYSTICK TRUE)
|
||||||
|
|
||||||
if(SDL_HAPTIC)
|
if(SDL_HAPTIC)
|
||||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/windows/*.c)
|
if(HAVE_DINPUT_H OR HAVE_XINPUT_H)
|
||||||
|
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/windows/*.c)
|
||||||
|
if(HAVE_DINPUT_H)
|
||||||
|
set(SDL_HAPTIC_DINPUT 1)
|
||||||
|
endif()
|
||||||
|
if(HAVE_XINPUT_H)
|
||||||
|
set(SDL_HAPTIC_XINPUT 1)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
|
||||||
|
set(SDL_HAPTIC_DUMMY 1)
|
||||||
|
endif()
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
|
||||||
if(HAVE_DINPUT_H)
|
|
||||||
set(SDL_HAPTIC_DINPUT 1)
|
|
||||||
endif()
|
|
||||||
if(HAVE_XINPUT_H)
|
|
||||||
set(SDL_HAPTIC_XINPUT 1)
|
|
||||||
endif()
|
|
||||||
set(HAVE_SDL_HAPTIC TRUE)
|
set(HAVE_SDL_HAPTIC TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -232,6 +232,7 @@
|
||||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||||
|
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||||
|
@ -243,6 +244,7 @@
|
||||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||||
|
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
||||||
|
|
Loading…
Reference in New Issue