[CMAKE:MSVC] Refine ASM16 ml.exe path selection. Addendum to commit 60733590.

This commit is contained in:
Hermès Bélusca-Maïto 2022-04-17 19:31:07 +02:00
parent 8ed7d4b341
commit ea3e4bb4cb
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -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")