diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 443343a4e18..af00f6670f5 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -59,8 +59,10 @@ else() endif() set(WINDOWS_ARM64_MIN_VSCMD_VER 17.12.3) -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" AND $ENV{VSCMD_VER} VERSION_LESS WINDOWS_ARM64_MIN_VSCMD_VER) - message(FATAL_ERROR "Windows ARM64 requires VS2022 version ${WINDOWS_ARM64_MIN_VSCMD_VER} or greater - please update your VS2022 install!") +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") + if($ENV{VSCMD_VER} VERSION_LESS WINDOWS_ARM64_MIN_VSCMD_VER) + message(FATAL_ERROR "Windows ARM64 requires VS2022 version ${WINDOWS_ARM64_MIN_VSCMD_VER} or greater - please update your VS2022 install!") + endif() endif() if(WITH_BLENDER AND NOT WITH_PYTHON_MODULE)