summaryrefslogtreecommitdiff
path: root/Modules/CMakeGenericSystem.cmake
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2020-09-25 00:01:17 -0400
committerBrad King <brad.king@kitware.com>2020-09-25 13:11:14 -0400
commit561d4b4a47281e715b2868811093e15fd560d307 (patch)
tree65c14faced7c2f9e517add802ae5e927ba290a2d /Modules/CMakeGenericSystem.cmake
parent0cd1ef0932dfb4c0c2c7d0eaa5d91a8593b3a3d7 (diff)
downloadcmake-561d4b4a47281e715b2868811093e15fd560d307.tar.gz
VS: Fix CMAKE_INSTALL_PREFIX with GENERATOR_PLATFORM for x64 and ARM
Generate the same default `CMAKE_INSTALL_PREFIX` if a project is configured with CMAKE_GENERATOR_PLATFORM (`cmake -G "Visual Studio [...]" -A x64` and `cmake -G "Visual Studio [...]" -A ARM`) instead of the prior CMake 3.1 way (`cmake -G "Visual Studio [...] Win64"` and `cmake -G "Visual Studio [...] ARM"`).
Diffstat (limited to 'Modules/CMakeGenericSystem.cmake')
-rw-r--r--Modules/CMakeGenericSystem.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 6f665a6269..649b6f7c84 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -77,10 +77,14 @@ function(GetDefaultWindowsPrefixBase var)
#
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
set(arch_hint "x64")
+ elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64")
+ set(arch_hint "x64")
elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM64")
set(arch_hint "ARM64")
elseif("${CMAKE_GENERATOR}" MATCHES "ARM")
set(arch_hint "ARM")
+ elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM")
+ set(arch_hint "ARM")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(arch_hint "x64")
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")