[cmake-developers] [patch] handle RC files as resources
Tim Blechmann
tim at klingt.org
Fri Jun 6 04:16:51 EDT 2014
hi all,
i've came across, that .rc files are treated as windows resources, but
not upper-case .RC files. attached patch tries to correct this. it is a
functional change, though it brings the implementation in line with
Modules/CMakeCXXCompiler.cmake.in and the like.
would be great if someone could review and/or commit it.
thanks a lot,
tim
-------------- next part --------------
>From 0e41cb7df9dcb2587d928504c042a8ed0b51bc39 Mon Sep 17 00:00:00 2001
From: Tim Blechmann <tim at klingt.org>
Date: Fri, 6 Jun 2014 09:59:33 +0200
Subject: [PATCH] SystemTools: handle RC as resource file format extension
.RC files are not recorgnized as resource files by GetFileFormat, though
the CMakeLangCompiler.cmake.in files list this file extension:
Modules/CMakeCXXCompiler.cmake.in:
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
this patch resolve this inconsistency
Signed-off-by: Tim Blechmann <tim at klingt.org>
---
Source/cmSystemTools.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ff05975..4b91aaa 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1222,7 +1222,8 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
ext == "in" || ext == ".in" ||
ext == "txx" || ext == ".txx"
) { return cmSystemTools::HEADER_FILE_FORMAT; }
- if ( ext == "rc" || ext == ".rc" )
+ if ( ext == "rc" || ext == ".rc" ||
+ ext == "RC" || ext == ".RC")
{ return cmSystemTools::RESOURCE_FILE_FORMAT; }
if ( ext == "def" || ext == ".def" )
{ return cmSystemTools::DEFINITION_FILE_FORMAT; }
--
2.0.0
More information about the cmake-developers
mailing list