diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 83acf1bae0..ceff199ab5 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -110,9 +110,18 @@ function(vcpkg_configure_cmake) set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") set(GENERATOR "Visual Studio 16 2019") - set(ARCH "${VCPKG_TARGET_ARCHITECTURE}") + set(ARCH "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM64") else() if(NOT VCPKG_CMAKE_SYSTEM_NAME)