Commit 7147ed5c authored by Brad King's avatar Brad King
Browse files

CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)

A 64-bit MinGW windres is named "i686-w64-mingw32.shared-windres".  The
get_filename_component NAME_WE mode may strip the ".shared-windres" part
and cause the result to no longer contain "windres".  Instead, match the
"windres" name in the full CMAKE_RC_COMPILER value first, and use the
get_filename_component code path only for other resource compilers.
parent db924e00
......@@ -19,9 +19,10 @@
# make sure we don't use CMAKE_BASE_NAME from somewhere else
get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
if("${CMAKE_BASE_NAME}" MATCHES "windres")
set(CMAKE_BASE_NAME "windres")
if(CMAKE_RC_COMPILER MATCHES "windres[^/]*$")
set(CMAKE_BASE_NAME "windres")
get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment