MinGW: Fix default windres selection when cross-compiling

When cross-compiling to MinGW, select the `windres` tool named with the
toolchain's prefix.

Fixes: #20500
This commit is contained in:
Brad King 2020-03-25 07:18:08 -04:00
parent 0251ddadab
commit af4adf6aa9

View File

@ -128,7 +128,7 @@ macro(__windows_compiler_gnu lang)
endif()
if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC)
set(CMAKE_RC_COMPILER_INIT windres)
set(CMAKE_RC_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}windres)
endif()
enable_language(RC)