summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2014-01-07 22:52:42 +0400
committerBrad King <brad.king@kitware.com>2014-01-07 14:10:55 -0500
commit93fc5a53a6252e1ef14894b7e6eb8e69c20858b6 (patch)
tree4ffa5c8036876f101964ff432f7ead5d30803809
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadcmake-93fc5a53a6252e1ef14894b7e6eb8e69c20858b6.tar.gz
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 0a2b32b4fb..c181c59268 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.