diff options
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b85f30b852..38461acaee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |