Parcourir la source

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 <[email protected]>
Inspired-by: Gilles Khouzam <[email protected]>
Brad King il y a 11 ans
Parent
commit
dbb5a7ee31

+ 5 - 0
Modules/CMakeDetermineCompilerId.cmake

@@ -180,6 +180,11 @@ Id flags: ${testflags}
     else()
       set(id_system_version "")
     endif()
+    if(id_platform STREQUAL ARM)
+      set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>")
+    else()
+      set(id_WindowsSDKDesktopARMSupport "")
+    endif()
     if(CMAKE_VS_WINCE_VERSION)
       set(id_entrypoint "mainACRTStartup")
       if("${vs_version}" VERSION_LESS 9)

+ 1 - 0
Modules/CompilerId/VS-10.vcxproj.in

@@ -12,6 +12,7 @@
     <Keyword>Win32Proj</Keyword>
     @id_system@
     @id_system_version@
+    @id_WindowsSDKDesktopARMSupport@
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">