From 6ae075edf3c052a923074b46ae1115718a621acd Mon Sep 17 00:00:00 2001 From: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> Date: Sat, 1 Oct 2022 10:43:35 +0530 Subject: [PATCH] Fix Visual Studio 2022 detection (#6520) Adds Visual Studio 2022 detection to DetectMachine --- cmake/modules/DetectMachine.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/modules/DetectMachine.cmake b/cmake/modules/DetectMachine.cmake index 8ac7dacaa..388efeb82 100644 --- a/cmake/modules/DetectMachine.cmake +++ b/cmake/modules/DetectMachine.cmake @@ -63,7 +63,10 @@ IF(WIN32) MESSAGE(WARNING "Unknown target architecture: ${MSVC_TARGET_PLATFORM}") ENDIF() - IF(MSVC_VER VERSION_GREATER 19.20 OR MSVC_VER VERSION_EQUAL 19.20) + IF(MSVC_VER VERSION_GREATER 19.30 OR MSVC_VER VERSION_EQUAL 19.30) + SET(LMMS_MSVC_GENERATOR "Visual Studio 17 2022") + SET(LMMS_MSVC_YEAR 2022) + ELSEIF(MSVC_VER VERSION_GREATER 19.20 OR MSVC_VER VERSION_EQUAL 19.20) SET(LMMS_MSVC_GENERATOR "Visual Studio 16 2019") SET(LMMS_MSVC_YEAR 2019) # Qt only provides binaries for MSVC 2017, but 2019 is binary compatible ELSEIF(MSVC_VER VERSION_GREATER 19.10 OR MSVC_VER VERSION_EQUAL 19.10)