summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineRCCompiler.cmake
diff options
context:
space:
mode:
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