diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2014-01-07 18:52:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-07 19:07:32 (GMT) |
commit | 2d23c1f1777b38d4b704872598ae6bf1ecd88db9 (patch) | |
tree | 03c51b85936b3e492759683a2203ac99f46c39f7 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 855e8759fdf20a209f19f02e8dc5d203f4713a6a (diff) | |
download | CMake-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'.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 |
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())); } |