diff options
author | Brad King <brad.king@kitware.com> | 2014-09-04 13:48:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-09-04 13:48:22 (GMT) |
commit | 1dbb46483a042df7fc9b2579c95d0f4eee988559 (patch) | |
tree | 55acfdb3bcc4d9a98a5493d5601520f43f10776d /Source | |
parent | 44e6612fdc84ad9a351bb95c18937764475a21b7 (diff) | |
parent | 8eacc3390a2b9a9fb6e5df2cec9b9b8da0354961 (diff) | |
download | CMake-1dbb46483a042df7fc9b2579c95d0f4eee988559.zip CMake-1dbb46483a042df7fc9b2579c95d0f4eee988559.tar.gz CMake-1dbb46483a042df7fc9b2579c95d0f4eee988559.tar.bz2 |
Merge topic 'xcode-assetcatalog-folder-type'
8eacc339 Xcode: Reference '.xcassets' folders as assetcatalog (#15125)
02aa5965 Xcode: Refactor internal file type extension extraction
Diffstat (limited to 'Source')
-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); } |