summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineRCCompiler.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-12-22 20:26:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2010-12-23 22:04:49 (GMT)
commitb2f308c8f9b4ded77f0693b39c0288e3bbb00977 (patch)
tree17147169f0687131605f82690ca28ab678d2b2cb /Modules/CMakeDetermineRCCompiler.cmake
parent8c7b19d35ee81afac57fe623217578191f4d034c (diff)
downloadCMake-b2f308c8f9b4ded77f0693b39c0288e3bbb00977.zip
CMake-b2f308c8f9b4ded77f0693b39c0288e3bbb00977.tar.gz
CMake-b2f308c8f9b4ded77f0693b39c0288e3bbb00977.tar.bz2
Add support for windows resources with mingw/msys.
Diffstat (limited to 'Modules/CMakeDetermineRCCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 094b893..8e085af 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -54,6 +54,12 @@ ENDIF(NOT CMAKE_RC_COMPILER)
MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
+GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE)
+IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres")
+ SET(CMAKE_RC_OUTPUT_EXTENSION .obj)
+ELSE()
+ SET(CMAKE_RC_OUTPUT_EXTENSION .res)
+ENDIF()
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in