summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2014-01-07 18:52:42 (GMT)
committerBrad King <brad.king@kitware.com>2014-01-07 19:10:55 (GMT)
commit93fc5a53a6252e1ef14894b7e6eb8e69c20858b6 (patch)
tree4ffa5c8036876f101964ff432f7ead5d30803809
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-93fc5a53a6252e1ef14894b7e6eb8e69c20858b6.zip
CMake-93fc5a53a6252e1ef14894b7e6eb8e69c20858b6.tar.gz
CMake-93fc5a53a6252e1ef14894b7e6eb8e69c20858b6.tar.bz2
Xcode: Fix storyboard view
Since commit 56831461 (Xcode: Use explicitFileType to mark source types, 2013-04-16) the Xcode generator prefers to use explicitFileType to tell Xcode about each source file type. This works better than lastKnownFileType for some file types, but not for "file.storyboard". If storyboard file has attribute 'explicitFileType' it is displayed incorrectly (as raw xml). Switch it back to 'lastKnownFileType'.
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 0a2b32b..c181c59 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -877,8 +877,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
}
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
-
- fileRef->AddAttribute("explicitFileType",
+ const char* attribute = (sourcecode == "file.storyboard") ?
+ "lastKnownFileType" :
+ "explicitFileType";
+ fileRef->AddAttribute(attribute,
this->CreateString(sourcecode.c_str()));
// Store the file path relative to the top of the source tree.