From dbb5a7ee315948b4f16e5c6a549db090e266e51d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Aug 2014 14:44:12 -0400 Subject: [PATCH] CMakeDetermineCompilerId: Fix detection for VS ARM platform Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. Inspired-by: Minmin Gong Inspired-by: Gilles Khouzam --- Modules/CMakeDetermineCompilerId.cmake | 5 +++++ Modules/CompilerId/VS-10.vcxproj.in | 1 + 2 files changed, 6 insertions(+) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index a780fa6da..1fca55d04 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -180,6 +180,11 @@ Id flags: ${testflags} else() set(id_system_version "") endif() + if(id_platform STREQUAL ARM) + set(id_WindowsSDKDesktopARMSupport "true") + else() + set(id_WindowsSDKDesktopARMSupport "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index bacbca4ea..a17d03d0d 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -12,6 +12,7 @@ Win32Proj @id_system@ @id_system_version@ + @id_WindowsSDKDesktopARMSupport@