| 4145 | } |
| 4146 | |
| 4147 | struct cmGeneratorTarget::SourceFileFlags |
| 4148 | cmGeneratorTarget::GetTargetSourceFileFlags(cmSourceFile const* sf) const |
| 4149 | { |
| 4150 | struct SourceFileFlags flags; |
| 4151 | this->ConstructSourceFileFlags(); |
| 4152 | auto si = this->SourceFlagsMap.find(sf); |
| 4153 | if (si != this->SourceFlagsMap.end()) { |
| 4154 | flags = si->second; |
| 4155 | } else { |
| 4156 | // Handle the MACOSX_PACKAGE_LOCATION property on source files that |
| 4157 | // were not listed in one of the other lists. |
| 4158 | if (cmValue location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) { |
| 4159 | flags.MacFolder = location->c_str(); |
| 4160 | bool const stripResources = |
| 4161 | this->GlobalGenerator->ShouldStripResourcePath(this->Makefile); |
| 4162 | if (*location == "Resources") { |
| 4163 | flags.Type = cmGeneratorTarget::SourceFileTypeResource; |
| 4164 | if (stripResources) { |
| 4165 | flags.MacFolder = ""; |
| 4166 | } |
| 4167 | } else if (cmHasLiteralPrefix(*location, "Resources/")) { |
| 4168 | flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource; |
| 4169 | if (stripResources) { |
| 4170 | flags.MacFolder += cmStrLen("Resources/"); |
| 4171 | } |
| 4172 | } else { |
| 4173 | flags.Type = cmGeneratorTarget::SourceFileTypeMacContent; |
| 4174 | } |
| 4175 | } |
| 4176 | } |
| 4177 | return flags; |
| 4178 | } |
| 4179 | |
| 4180 | void cmGeneratorTarget::ConstructSourceFileFlags() const |
| 4181 | { |
no test coverage detected