MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015125 | CMake | CMake | public | 2014-09-03 08:47 | 2015-03-02 08:57 |
Reporter | Jan Rüegg | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | CMake 3.0.1 | ||||
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | ||
Summary | 0015125: XCode generator cannot add assetcatalog assets | ||||
Description | When adding resources to an XCode CMake project like this: set_target_properties(foo PROPERTIES RESOURCE example/demo_app/Images.xcassets) An entry similar to this one is created in the xcode project: 1582C9DBB34F4291A1D09CA3 /* Images.xcassets */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = Images.xcassets; path = example/demo_app/Images.xcassets; sourceTree = SOURCE_ROOT; }; This works fine for normal folders, however I would like to use this to add an assets folder. This creates a very similar entry, however to make it work with xcode the lastKnownFileType needs to be changed from "folder" to "folder.assetcatalog", like this: 1582C9DBB34F4291A1D09CA3 /* Images.xcassets */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/demo_app/Images.xcassets; sourceTree = SOURCE_ROOT; }; In CMake 3.0.1, this is generated in the file "cmGlobalXCodeGenerator.cxx", line 874: if(cmSystemTools::FileIsDirectory(fullpath.c_str())) { fileRef->AddAttribute("lastKnownFileType", this->CreateString("folder")); } In order to make it work, it would need to be changed to read something like this (pseudocode): if(cmSystemTools::FileIsDirectory(fullpath.c_str())) { if (fileEndsWith(".xcassets")) { fileRef->AddAttribute("lastKnownFileType", this->CreateString("folder.assetcatalog")); } else { fileRef->AddAttribute("lastKnownFileType", this->CreateString("folder")); } } | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-09-03 08:47 | Jan Rüegg | New Issue | |||
2014-09-03 08:48 | Jan Rüegg | Note Added: 0036707 | |||
2014-09-03 11:32 | Brad King | Note Added: 0036723 | |||
2014-09-03 11:32 | Brad King | Assigned To | => Brad King | ||
2014-09-03 11:32 | Brad King | Status | new => assigned | ||
2014-09-03 11:32 | Brad King | Target Version | => CMake 3.1 | ||
2014-09-04 09:45 | Brad King | Status | assigned => resolved | ||
2014-09-04 09:45 | Brad King | Resolution | open => fixed | ||
2014-09-04 09:45 | Brad King | Fixed in Version | => CMake 3.1 | ||
2015-03-02 08:57 | Robert Maynard | Note Added: 0038105 | |||
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|