Add support for building with Visual Studio 2022
authorArkadiusz Sarwa <arkadiusz.sarwa@amd.com>
Wed, 8 Dec 2021 16:04:31 +0000 (17:04 +0100)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 7 Jan 2022 21:14:18 +0000 (21:14 +0000)
Components: Framework

VK-GL-CTS Issue: 3403

Change-Id: I40fb75e00cb749948f9b1e47191e8ac4baaf37bb

scripts/build/config.py

index 67cacdb..ed535fc 100644 (file)
@@ -182,7 +182,8 @@ class VSProjectGenerator(CMakeGenerator):
                                12:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.12.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\12.0")],
                                14:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.14.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\14.0")],
                                15:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.15.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\15.0")],
-                               16:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.16.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\16.0")]
+                               16:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.16.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\16.0")],
+                               17:             [(_winreg.HKEY_CLASSES_ROOT, "VisualStudio.DTE.17.0"), (_winreg.HKEY_LOCAL_MACHINE, "Software\\Microsoft\\VCExpress\\17.0")]
                        }
 
                        if not self.version in keyMap:
@@ -213,6 +214,8 @@ VS2017_X32_GENERATOR        = VSProjectGenerator(15, VSProjectGenerator.ARCH_32BIT)
 VS2017_X64_GENERATOR   = VSProjectGenerator(15, VSProjectGenerator.ARCH_64BIT)
 VS2019_X32_GENERATOR   = VSProjectGenerator(16, VSProjectGenerator.ARCH_32BIT)
 VS2019_X64_GENERATOR   = VSProjectGenerator(16, VSProjectGenerator.ARCH_64BIT)
+VS2022_X32_GENERATOR   = VSProjectGenerator(17, VSProjectGenerator.ARCH_32BIT)
+VS2022_X64_GENERATOR   = VSProjectGenerator(17, VSProjectGenerator.ARCH_64BIT)
 
 def selectFirstAvailableGenerator (generators):
        for generator in generators:
@@ -221,6 +224,7 @@ def selectFirstAvailableGenerator (generators):
        return None
 
 ANY_VS_X32_GENERATOR   = selectFirstAvailableGenerator([
+                                                               VS2022_X32_GENERATOR,
                                                                VS2019_X32_GENERATOR,
                                                                VS2017_X32_GENERATOR,
                                                                VS2015_X32_GENERATOR,
@@ -229,6 +233,7 @@ ANY_VS_X32_GENERATOR        = selectFirstAvailableGenerator([
                                                                VS2010_X32_GENERATOR,
                                                        ])
 ANY_VS_X64_GENERATOR   = selectFirstAvailableGenerator([
+                                                               VS2022_X64_GENERATOR,
                                                                VS2019_X64_GENERATOR,
                                                                VS2017_X64_GENERATOR,
                                                                VS2015_X64_GENERATOR,
@@ -242,6 +247,8 @@ ANY_UNIX_GENERATOR          = selectFirstAvailableGenerator([
                                                                NMAKE_GENERATOR,
                                                        ])
 ANY_GENERATOR                  = selectFirstAvailableGenerator([
+                                                               VS2022_X64_GENERATOR,
+                                                               VS2022_X32_GENERATOR,
                                                                VS2019_X64_GENERATOR,
                                                                VS2019_X32_GENERATOR,
                                                                VS2017_X64_GENERATOR,