diff options
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index ee5fc00..3625449 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -864,24 +864,24 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( } if(fileType.empty()) { + // Compute the extension without leading '.'. + std::string ext = cmSystemTools::GetFilenameLastExtension(fullpath); + if(!ext.empty()) + { + ext = ext.substr(1); + } + // If fullpath references a directory, then we need to specify // lastKnownFileType as folder in order for Xcode to be able to // open the contents of the folder. // (Xcode 4.6 does not like explicitFileType=folder). if(cmSystemTools::FileIsDirectory(fullpath.c_str())) { - fileType = "folder"; + fileType = (ext == "xcassets"? "folder.assetcatalog" : "folder"); useLastKnownFileType = true; } else { - // Compute the extension without leading '.'. - std::string ext = cmSystemTools::GetFilenameLastExtension(fullpath); - if(!ext.empty()) - { - ext = ext.substr(1); - } - fileType = GetSourcecodeValueFromFileExtension( ext, lang, useLastKnownFileType); } |