summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeRCInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-28 17:03:56 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-28 17:10:55 (GMT)
commit79a915383fd0c0e55bf0ca5fe5b3cf07d1823aa7 (patch)
tree62d15341dbb16148ce96a20d548b7c71542395a2 /Modules/CMakeRCInformation.cmake
parentc77194ec471dd4f039c0c30e05f0b519ab44bc14 (diff)
downloadCMake-79a915383fd0c0e55bf0ca5fe5b3cf07d1823aa7.zip
CMake-79a915383fd0c0e55bf0ca5fe5b3cf07d1823aa7.tar.gz
CMake-79a915383fd0c0e55bf0ca5fe5b3cf07d1823aa7.tar.bz2
RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache
Diffstat (limited to 'Modules/CMakeRCInformation.cmake')
-rw-r--r--Modules/CMakeRCInformation.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 10f2cfb..7ddd297 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -17,11 +17,26 @@ set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-string(STRIP "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CMAKE_RC_FLAGS_INIT)
+set(CMAKE_RC_FLAGS_INIT "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}")
+
+foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
+ string(STRIP "${CMAKE_RC_FLAGS${c}_INIT}" CMAKE_RC_FLAGS${c}_INIT)
+endforeach()
set (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Windows Resource Compiler.")
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_RC_FLAGS_DEBUG "${CMAKE_RC_FLAGS_DEBUG_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during debug builds.")
+ set (CMAKE_RC_FLAGS_MINSIZEREL "${CMAKE_RC_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds for minimum size.")
+ set (CMAKE_RC_FLAGS_RELEASE "${CMAKE_RC_FLAGS_RELEASE_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds.")
+ set (CMAKE_RC_FLAGS_RELWITHDEBINFO "${CMAKE_RC_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds with debug info.")
+endif()
+
# These are the only types of flags that should be passed to the rc
# command, if COMPILE_FLAGS is used on a target this will be used
# to filter out any other flags