Ninja: Do not use cmcldeps for RC on non-Windows hosts

The `cmcldeps` executable is only built on Windows.  If running MSVC on
a different OS (with various compatibility wrapping), don't try to use
`cmcldeps`, as the executable doesn't exist.

Fixes: #21760
This commit is contained in:
Martin Storsjö 2022-01-05 18:45:40 +02:00 committed by Brad King
parent 353318cc53
commit d49e168e1b

View File

@ -478,7 +478,7 @@ macro(__windows_compiler_msvc_enable_rc flags)
endif()
enable_language(RC)
if(NOT DEFINED CMAKE_NINJA_CMCLDEPS_RC)
if(NOT DEFINED CMAKE_NINJA_CMCLDEPS_RC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_NINJA_CMCLDEPS_RC 1)
endif()
endmacro()