Updates the explicit location for armasm
authorjashoo <jashoo@microsoft.com>
Thu, 13 Jul 2017 22:19:33 +0000 (15:19 -0700)
committerjashook <jashoo@microsoft.com>
Mon, 17 Jul 2017 16:34:09 +0000 (09:34 -0700)
CMakeLists.txt

index b85f30b852f585e055eb7d541251169ce4913041..38461acaee4fb450d5764bb342df95c1b4f1a265 100644 (file)
@@ -52,11 +52,15 @@ if (WIN32)
       endif()
 
       # Explicitly specify the assembler to be used for Arm32 compile
-      file(TO_CMAKE_PATH "$ENV{VCINSTALLDIR}\\bin\\x86_arm\\armasm.exe" CMAKE_ASM_COMPILER)
-
+      if($ENV{__VSVersion} STREQUAL "vs2015")
+        file(TO_CMAKE_PATH "$ENV{VCINSTALLDIR}\\bin\\x86_arm\\armasm.exe" CMAKE_ASM_COMPILER)
+      else()
+        file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX86\\arm\\armasm.exe" CMAKE_ASM_COMPILER)
+      endif()
+      
       set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
       message("CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER}") 
-      
+
       # Enable generic assembly compilation to avoid CMake generate VS proj files that explicitly
       # use ml[64].exe as the assembler.
       enable_language(ASM)