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:07:32 (GMT)
commit2d23c1f1777b38d4b704872598ae6bf1ecd88db9 (patch)
tree03c51b85936b3e492759683a2203ac99f46c39f7
parent855e8759fdf20a209f19f02e8dc5d203f4713a6a (diff)
downloadCMake-2d23c1f1777b38d4b704872598ae6bf1ecd88db9.zip
CMake-2d23c1f1777b38d4b704872598ae6bf1ecd88db9.tar.gz
CMake-2d23c1f1777b38d4b704872598ae6bf1ecd88db9.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.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 381c1f5..eef49db 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -876,7 +876,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
else
{
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()));
}