https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ea3e4bb4cb1f790bd3b5a…
commit ea3e4bb4cb1f790bd3b5a414ab141f384a54e1ba
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Apr 17 19:31:07 2022 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Apr 17 19:31:48 2022 +0200
[CMAKE:MSVC] Refine ASM16 ml.exe path selection. Addendum to commit 60733590.
---
sdk/cmake/msvc.cmake | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index af021129b22..5c6492f448e 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -414,10 +414,14 @@ set(PSEH_LIB "pseh")
# Use a full path for the x86 version of ml when using x64 VS.
# It's not a problem when using the DDK/WDK because, in x64 mode,
# both the x86 and x64 versions of ml are available.
-if((ARCH STREQUAL "amd64") AND (DEFINED ENV{VCToolsInstallDir}))
- set(CMAKE_ASM16_COMPILER $ENV{VCToolsInstallDir}/bin/HostX86/x86/ml.exe)
-elseif((ARCH STREQUAL "amd64") AND (DEFINED ENV{VCINSTALLDIR}))
- set(CMAKE_ASM16_COMPILER $ENV{VCINSTALLDIR}/bin/ml.exe)
+if(ARCH STREQUAL "amd64")
+ if((MSVC_VERSION LESS_EQUAL 1900) AND (DEFINED ENV{VCINSTALLDIR}))
+ set(CMAKE_ASM16_COMPILER $ENV{VCINSTALLDIR}/bin/ml.exe)
+ elseif(DEFINED ENV{VCToolsInstallDir})
+ set(CMAKE_ASM16_COMPILER $ENV{VCToolsInstallDir}/bin/HostX86/x86/ml.exe)
+ else()
+ set(CMAKE_ASM16_COMPILER ml.exe)
+ endif()
elseif(ARCH STREQUAL "arm")
set(CMAKE_ASM16_COMPILER armasm.exe)
elseif(ARCH STREQUAL "arm64")