From 12cae64642b8bd89c39e38ac06da946e6105cbaa Mon Sep 17 00:00:00 2001 From: Marvin Date: Mon, 23 Jan 2023 23:21:43 +0100 Subject: [PATCH] Fix Hunter on Windows MSVC CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE 'ARM64' (#655) * Fixed problem where you could not use Hunter on Windows ARM64 * Fixed problem where you could not use Hunter on Windows ARM64 * Fixed problem where you could not use Hunter on Windows ARM64 --- cmake/modules/hunter_setup_msvc.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index 9757b7be7c..af5a122b58 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -121,7 +121,7 @@ macro(hunter_setup_msvc) elseif(_is_arm) set(HUNTER_MSVC_ARCH_TARGET "arm") elseif(_is_arm64) - set(HUNTER_MSVC_ARCH_TARGET "arm64") + set(HUNTER_MSVC_ARCH_TARGET "ARM64") else() hunter_internal_error( "Unexpected MSVC_*_ARCHITECTURE_ID: '${_architecture_id}'" @@ -132,11 +132,17 @@ macro(hunter_setup_msvc) string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" "" _host_is_default_x86) string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" "x86" _host_is_x86) string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" "x64" _host_is_x64) + string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" "arm" _host_is_arm) + string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" "ARM64" _host_is_arm64) if(_host_is_x86 OR _host_is_default_x86) set(HUNTER_MSVC_ARCH_HOST "x86") elseif(_host_is_x64) set(HUNTER_MSVC_ARCH_HOST "amd64") + elseif(_host_is_arm) + set(HUNTER_MSVC_ARCH_HOST "arm") + elseif(_host_is_arm64) + set(HUNTER_MSVC_ARCH_HOST "ARM64") else() hunter_internal_error( "Unexpected CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE: '${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'"