Modules: Use "windres" as rc compiler base name for cross-compiles (#12480)

...if it matches "windres", as opposed to being exactly equal to "windres"

Cross-compiling windres compilers are named something like
"i686-w64-mingw32-windres" (for example)
This commit is contained in:
David Cole 2011-12-13 19:57:00 -05:00
parent 3c101429a4
commit 6ddb1e5b9a
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@
# make sure we don't use CMAKE_BASE_NAME from somewhere else # make sure we don't use CMAKE_BASE_NAME from somewhere else
SET(CMAKE_BASE_NAME) SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
IF("${CMAKE_BASE_NAME}" MATCHES "windres")
SET(CMAKE_BASE_NAME "windres")
ENDIF()
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)