From 0753e6b560404de32ce6e43527cd5a2a5385d1f0 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Fri, 21 Aug 2015 18:33:10 -0300 Subject: [PATCH] Hopefully fix xinput support not being enabled in SDL. --- libs/SDL2/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/SDL2/CMakeLists.txt b/libs/SDL2/CMakeLists.txt index 056bfd5d..508cfafc 100644 --- a/libs/SDL2/CMakeLists.txt +++ b/libs/SDL2/CMakeLists.txt @@ -887,13 +887,19 @@ elseif(WINDOWS) message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set") endif() set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"") + + # xinput.h needs windows.h but doesn't include it itself. + check_c_source_compiles(" + #include + #include + int main(int argc, char **argv) { }" HAVE_XINPUT_H) + check_include_file(d3d9.h HAVE_D3D_H) check_include_file(d3d11_1.h HAVE_D3D11_H) check_include_file(ddraw.h HAVE_DDRAW_H) check_include_file(dsound.h HAVE_DSOUND_H) check_include_file(dinput.h HAVE_DINPUT_H) check_include_file(xaudio2.h HAVE_XAUDIO2_H) - check_include_file(xinput.h HAVE_XINPUT_H) check_include_file(dxgi.h HAVE_DXGI_H) if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H) set(HAVE_DIRECTX TRUE)