diff options
author | Brad King <brad.king@kitware.com> | 2014-04-10 14:10:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-11 13:10:56 (GMT) |
commit | 7147ed5ce45ac6ae9d5f4e6e45bce2c66be39be3 (patch) | |
tree | 5079cebca5d0d6f9743467534453ddab2e7f56f2 /Modules/CMakeRCInformation.cmake | |
parent | db924e00b4ddb7c068103e43f314042b154f38ac (diff) | |
download | CMake-7147ed5ce45ac6ae9d5f4e6e45bce2c66be39be3.zip CMake-7147ed5ce45ac6ae9d5f4e6e45bce2c66be39be3.tar.gz CMake-7147ed5ce45ac6ae9d5f4e6e45bce2c66be39be3.tar.bz2 |
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.
Diffstat (limited to 'Modules/CMakeRCInformation.cmake')
-rw-r--r-- | Modules/CMakeRCInformation.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 6899457..6bb2636 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -19,9 +19,10 @@ # make sure we don't use CMAKE_BASE_NAME from somewhere else set(CMAKE_BASE_NAME) -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") +else() + get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) endif() set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) |