CMakeLists.txt
changeset 9853 3d08cb641cd5
parent 9758 cf4d3ee2b37b
child 9854 dbcbdc2940ef
equal deleted inserted replaced
9852:6436a20efcae 9853:3d08cb641cd5
   904       if("$ENV{DXSDK_DIR}" STREQUAL "")
   904       if("$ENV{DXSDK_DIR}" STREQUAL "")
   905         message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
   905         message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
   906       endif()
   906       endif()
   907       set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
   907       set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
   908     endif()
   908     endif()
       
   909 
       
   910     if(HAVE_WIN32_CC)
       
   911       # xinput.h may need windows.h, but doesn't include it itself.
       
   912       check_c_source_compiles("
       
   913         #include <windows.h>
       
   914         #include <xinput.h>
       
   915         int main(int argc, char **argv) { }" HAVE_XINPUT_H)
       
   916     else()
       
   917       check_include_file(xinput.h HAVE_XINPUT_H)
       
   918     endif()
       
   919 
   909     check_include_file(d3d9.h HAVE_D3D_H)
   920     check_include_file(d3d9.h HAVE_D3D_H)
   910     check_include_file(d3d11_1.h HAVE_D3D11_H)
   921     check_include_file(d3d11_1.h HAVE_D3D11_H)
   911     check_include_file(ddraw.h HAVE_DDRAW_H)
   922     check_include_file(ddraw.h HAVE_DDRAW_H)
   912     check_include_file(dsound.h HAVE_DSOUND_H)
   923     check_include_file(dsound.h HAVE_DSOUND_H)
   913     check_include_file(dinput.h HAVE_DINPUT_H)
   924     check_include_file(dinput.h HAVE_DINPUT_H)
   914     check_include_file(xaudio2.h HAVE_XAUDIO2_H)
   925     check_include_file(xaudio2.h HAVE_XAUDIO2_H)
   915     check_include_file(xinput.h HAVE_XINPUT_H)
       
   916     check_include_file(dxgi.h HAVE_DXGI_H)
   926     check_include_file(dxgi.h HAVE_DXGI_H)
   917     if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
   927     if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
   918       set(HAVE_DIRECTX TRUE)
   928       set(HAVE_DIRECTX TRUE)
   919       if(NOT CMAKE_COMPILER_IS_MINGW)
   929       if(NOT CMAKE_COMPILER_IS_MINGW)
   920       # TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
   930       # TODO: change $ENV{DXSDL_DIR} to get the path from the include checks