From caa7981dcfbdc2da76335d82920bb781f7b047d6 Mon Sep 17 00:00:00 2001 From: kiwixz Date: Sat, 16 Mar 2019 17:53:31 +0100 Subject: [PATCH] fix vs2019 arch specification --- scripts/cmake/vcpkg_configure_cmake.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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)