From 0251ddadab687dc3ad62c39381201fcd1f7c534f Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 25 Mar 2020 07:14:42 -0400 Subject: MinGW: Drop unnecessary windres selection code with Unix Makefiles Since commit 957c2aac7f (RC: Simplify selection of resource compiler based on C/C++ toolchain, 2015-05-07, v3.3.0-rc1~93^2~5) we select windres as the RC compiler on MinGW via `CMAKE_RC_COMPILER_INIT`. Drop the special case from commit be9afbf453 (Find mingw's windres also when Unix Makefiles are used, 2012-08-27, v2.8.10~152^2). --- Modules/Platform/Windows-GNU.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 38a8cf4..00c1eb2 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -47,10 +47,6 @@ if("${_help}" MATCHES "GNU ld .* 2\\.1[1-6]") set(__WINDOWS_GNU_LD_RESPONSE 0) endif() -if(NOT CMAKE_GENERATOR_RC AND CMAKE_GENERATOR MATCHES "Unix Makefiles") - set(CMAKE_GENERATOR_RC windres) -endif() - macro(__windows_compiler_gnu lang) if(MSYS OR MINGW) -- cgit v0.12 From af4adf6aa9dd86d8ebb7d24590c1101f3a195ec8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 25 Mar 2020 07:18:08 -0400 Subject: 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 --- Modules/Platform/Windows-GNU.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 00c1eb2..5f1923c 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -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) -- cgit v0.12