Skip to content

Commit

Permalink
Fix Hunter on Windows MSVC CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTUR…
Browse files Browse the repository at this point in the history
…E '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
  • Loading branch information
ccmvn committed Jan 23, 2023
1 parent 11916bc commit 12cae64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/modules/hunter_setup_msvc.cmake
Expand Up @@ -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}'"
Expand All @@ -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}'"
Expand Down

0 comments on commit 12cae64

Please sign in to comment.