summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-28 22:25:53 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-29 00:09:04 (GMT)
commitb47092fddb51e2e89fa083af5c15fb6b81f35186 (patch)
treee5902903bcb178caffd885abf8b0525ee50c6663 /Modules/Platform/Windows-GNU.cmake
parentdaa2fc5833ea8b50191b2dd0970703db17da3abf (diff)
downloadCMake-b47092fddb51e2e89fa083af5c15fb6b81f35186.zip
CMake-b47092fddb51e2e89fa083af5c15fb6b81f35186.tar.gz
CMake-b47092fddb51e2e89fa083af5c15fb6b81f35186.tar.bz2
MinGW: Fix regression when windres is not found
The fix in commit e9755bc7c1 (MinGW: Restore using windres when toolchain-prefixed name is not available, 2022-08-15, v3.24.1~4^2) incorrectly listed two entries in `CMAKE_RC_COMPILER_INIT`, which is only meant to have one value. Revise the logic to support multiple platform-specific names for the Windows Resource Compiler while still only using one name as the fallback when it is not found. Fixes: #24190 Issue: #23841
Diffstat (limited to 'Modules/Platform/Windows-GNU.cmake')
-rw-r--r--Modules/Platform/Windows-GNU.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index bf96e63..088b238 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -157,7 +157,8 @@ macro(__windows_compiler_gnu lang)
endif()
if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC)
- set(CMAKE_RC_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}windres windres)
+ set(_CMAKE_RC_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}windres windres)
+ set(_CMAKE_RC_COMPILER_FALLBACK windres)
endif()
enable_language(RC)