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:10:55 (GMT) |
commit | 93fc5a53a6252e1ef14894b7e6eb8e69c20858b6 (patch) | |
tree | 4ffa5c8036876f101964ff432f7ead5d30803809 | |
parent | c515dc574879448d66e2c5a27b9807d95a27fefd (diff) | |
download | CMake-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.cxx | 6 |
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. |