CMakeLists.txt
changeset 8591 2228ae5a3ac6
parent 8303 7ee46ffa9c24
child 8606 29ffd0d3926b
equal deleted inserted replaced
8590:6e6bd53feff0 8591:2228ae5a3ac6
   797     if("$ENV{DXSDK_DIR}" STREQUAL "")
   797     if("$ENV{DXSDK_DIR}" STREQUAL "")
   798       message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
   798       message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
   799     endif()
   799     endif()
   800     set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
   800     set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
   801     check_include_file(d3d9.h HAVE_D3D_H)
   801     check_include_file(d3d9.h HAVE_D3D_H)
       
   802     check_include_file(d3d11_1.h HAVE_D3D11_H)
   802     check_include_file(ddraw.h HAVE_DDRAW_H)
   803     check_include_file(ddraw.h HAVE_DDRAW_H)
   803     check_include_file(dsound.h HAVE_DSOUND_H)
   804     check_include_file(dsound.h HAVE_DSOUND_H)
   804     check_include_file(dinput.h HAVE_DINPUT_H)
   805     check_include_file(dinput.h HAVE_DINPUT_H)
   805     check_include_file(xaudio2.h HAVE_XAUDIO2_H)
   806     check_include_file(xaudio2.h HAVE_XAUDIO2_H)
   806     if(HAVE_D3D_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
   807     if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
   807       set(HAVE_DIRECTX TRUE)
   808       set(HAVE_DIRECTX TRUE)
   808       # TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
   809       # TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
   809       link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
   810       link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
   810       include_directories($ENV{DXSDK_DIR}\\Include)
   811       include_directories($ENV{DXSDK_DIR}\\Include)
   811     endif()
   812     endif()
   840     file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
   841     file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
   841     set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})
   842     set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})
   842 
   843 
   843     if(RENDER_D3D AND HAVE_D3D_H)
   844     if(RENDER_D3D AND HAVE_D3D_H)
   844       set(SDL_VIDEO_RENDER_D3D 1)
   845       set(SDL_VIDEO_RENDER_D3D 1)
       
   846       set(HAVE_RENDER_D3D TRUE)
       
   847     endif()
       
   848     if(RENDER_D3D AND HAVE_D3D11_H)
       
   849       set(SDL_VIDEO_RENDER_D3D11 1)
   845       set(HAVE_RENDER_D3D TRUE)
   850       set(HAVE_RENDER_D3D TRUE)
   846     endif()
   851     endif()
   847     set(HAVE_SDL_VIDEO TRUE)
   852     set(HAVE_SDL_VIDEO TRUE)
   848   endif()
   853   endif()
   849 
   854