Skip to content

Commit 8d1151a

Browse files
authored
support VS 2026 generators (microsoft#48269)
1 parent dce593d commit 8d1151a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

scripts/buildsystems/vcpkg.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ else()
268268
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64)
269269
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022")
270270
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
271+
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 18 2026" AND CMAKE_VS_PLATFORM_NAME_DEFAULT STREQUAL "ARM64")
272+
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64)
273+
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 18 2026")
274+
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
271275
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED CMAKE_OSX_ARCHITECTURES)
272276
list(LENGTH CMAKE_OSX_ARCHITECTURES Z_VCPKG_OSX_ARCH_COUNT)
273277
if(Z_VCPKG_OSX_ARCH_COUNT EQUAL "0")

scripts/cmake/vcpkg_configure_cmake.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function(z_vcpkg_get_visual_studio_generator)
4242
set(generator "Visual Studio 16 2019")
4343
elseif("$ENV{VisualStudioVersion}" VERSION_LESS_EQUAL "17.99")
4444
set(generator "Visual Studio 17 2022")
45+
elseif("$ENV{VisualStudioVersion}" VERSION_LESS_EQUAL "18.99")
46+
set(generator "Visual Studio 18 2026")
4547
endif()
4648
endif()
4749

0 commit comments

Comments
 (0)