Windows ARM64: Check and cache VSCMD version
This uses the same technique as the one earlier in the file, that checks the `VCToolsRedistDir` env var Pull Request: https://projects.blender.org/blender/blender/pulls/134522
This commit is contained in:
@@ -59,9 +59,18 @@ else()
|
||||
endif()
|
||||
|
||||
set(WINDOWS_ARM64_MIN_VSCMD_VER 17.12.3)
|
||||
# We have a minimum version of VSCMD for ARM64 (ie, the version the libs were compiled against)
|
||||
# This checks for the version on initial run, and caches it, so users do not have to run the VS CMD window every time
|
||||
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!")
|
||||
set(VC_VSCMD_VER $ENV{VSCMD_VER} CACHE STRING "Version of the VSCMD initially run from")
|
||||
mark_as_advanced(VC_VSCMD_VER)
|
||||
set(VSCMD_VER ${VC_VSCMD_VER})
|
||||
if(DEFINED VSCMD_VER)
|
||||
if(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()
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to detect the Visual Studio CMD version, try running from the visual studio developer prompt.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user