From 3fafb147242f32079dd3b57b8a80ad9fbbb415cb Mon Sep 17 00:00:00 2001
From: Pavel Rojtberg <rojtberg@gmail.com>
Date: Sun, 25 Oct 2020 14:58:31 +0100
Subject: [PATCH] CMake: DirectX11 - fix discovery when using MINGW and having
 W10SDK

---
 CMake/Packages/FindDirectX11.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMake/Packages/FindDirectX11.cmake b/CMake/Packages/FindDirectX11.cmake
index 64c2343cbd1..1122783b092 100644
--- a/CMake/Packages/FindDirectX11.cmake
+++ b/CMake/Packages/FindDirectX11.cmake
@@ -18,7 +18,7 @@ if(WIN32) # The only platform it makes sense to check for DirectX11 SDK
 	include(FindPkgMacros)
 	findpkg_begin(DirectX11)
 
-	if( NOT MSVC90 )
+	if( MSVC AND NOT MSVC90 )
 		# Windows 10.x SDK
 		get_filename_component(kit10_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
 		file(GLOB W10SDK_VERSIONS RELATIVE ${kit10_dir}/Include ${kit10_dir}/Include/10.*) 			# enumerate pre-release and not yet known release versions
