From cacd27c973f6c84d13a67adaf5d6fce4ae898e9e Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Fri, 17 Jul 2015 21:16:53 +0100 Subject: cmake: Fix MSVC XP build. --- cmake/FindDirectX.cmake | 70 +++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 32 deletions(-) (limited to 'cmake') diff --git a/cmake/FindDirectX.cmake b/cmake/FindDirectX.cmake index fc631fe2..53d86e1f 100644 --- a/cmake/FindDirectX.cmake +++ b/cmake/FindDirectX.cmake @@ -148,6 +148,10 @@ if (WIN32) find_combined (DDRAW DDRAW DDRAW) if (CMAKE_GENERATOR_TOOLSET MATCHES "_xp$") + set (WINDOWS_XP TRUE) + endif () + + if (WINDOWS_XP) # Windows 7 SDKs, used by XP toolset, do not include d3d.h find_dxsdk_header (D3D d3d.h) else () @@ -174,38 +178,40 @@ if (WIN32) find_dxsdk_library (D3DX9 d3dx9) find_combined (D3DX9 D3DX9 D3DX9) - find_winsdk_header (DXGI dxgi.h) - find_winsdk_header (DXGI1_2 dxgi1_2.h) - find_winsdk_header (DXGI1_3 dxgi1_3.h) - find_winsdk_library (DXGI dxgi) - - find_winsdk_header (D3D10 d3d10.h) - find_winsdk_library (D3D10 d3d10) - find_combined (D3D10 D3D10 D3D10) - - find_winsdk_header (D3D10_1 d3d10_1.h) - find_winsdk_library (D3D10_1 d3d10_1) - find_combined (D3D10_1 D3D10_1 D3D10_1) - - find_dxsdk_header (D3DX10 d3dx10.h) - find_dxsdk_library (D3DX10 d3dx10) - find_combined (D3DX10 D3DX10 D3DX10) - - find_winsdk_header (D3D11 d3d11.h) - find_winsdk_library (D3D11 d3d11) - find_combined (D3D11 D3D11 D3D11) - find_winsdk_header (D3D11_1 d3d11_1.h) - find_combined (D3D11_1 D3D11_1 D3D11) - find_winsdk_header (D3D11_2 d3d11_2.h) - find_combined (D3D11_2 D3D11_2 D3D11) - - find_dxsdk_header (D3DX11 d3dx11.h) - find_dxsdk_library (D3DX11 d3dx11) - find_combined (D3DX11 D3DX11 D3DX11) - - find_winsdk_header (D2D1 d2d1.h) - find_winsdk_library (D2D1 d2d1) - find_combined (D2D1 D2D1 D2D1) + if (NOT WINDOWS_XP) + find_winsdk_header (DXGI dxgi.h) + find_winsdk_header (DXGI1_2 dxgi1_2.h) + find_winsdk_header (DXGI1_3 dxgi1_3.h) + find_winsdk_library (DXGI dxgi) + + find_winsdk_header (D3D10 d3d10.h) + find_winsdk_library (D3D10 d3d10) + find_combined (D3D10 D3D10 D3D10) + + find_winsdk_header (D3D10_1 d3d10_1.h) + find_winsdk_library (D3D10_1 d3d10_1) + find_combined (D3D10_1 D3D10_1 D3D10_1) + + find_dxsdk_header (D3DX10 d3dx10.h) + find_dxsdk_library (D3DX10 d3dx10) + find_combined (D3DX10 D3DX10 D3DX10) + + find_winsdk_header (D3D11 d3d11.h) + find_winsdk_library (D3D11 d3d11) + find_combined (D3D11 D3D11 D3D11) + find_winsdk_header (D3D11_1 d3d11_1.h) + find_combined (D3D11_1 D3D11_1 D3D11) + find_winsdk_header (D3D11_2 d3d11_2.h) + find_combined (D3D11_2 D3D11_2 D3D11) + + find_dxsdk_header (D3DX11 d3dx11.h) + find_dxsdk_library (D3DX11 d3dx11) + find_combined (D3DX11 D3DX11 D3DX11) + + find_winsdk_header (D2D1 d2d1.h) + find_winsdk_library (D2D1 d2d1) + find_combined (D2D1 D2D1 D2D1) + endif () find_program (DirectX_FXC_EXECUTABLE fxc HINTS ${DirectX_BIN_SEARCH_PATH} -- cgit v1.2.3