summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c8422d4..73d2009 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3380,8 +3380,18 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
// were not listed in one of the other lists.
if (const char* location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) {
flags.MacFolder = location;
+ const bool stripResources =
+ this->GlobalGenerator->ShouldStripResourcePath(this->Makefile);
if (strcmp(location, "Resources") == 0) {
flags.Type = cmGeneratorTarget::SourceFileTypeResource;
+ if (stripResources) {
+ flags.MacFolder = "";
+ }
+ } else if (cmSystemTools::StringStartsWith(location, "Resources/")) {
+ flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
+ if (stripResources) {
+ flags.MacFolder += strlen("Resources/");
+ }
} else {
flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;
}
@@ -3435,7 +3445,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
if (cmSourceFile* sf = this->Makefile->GetSource(*it)) {
SourceFileFlags& flags = this->SourceFlagsMap[sf];
flags.MacFolder = "";
- if (!this->Makefile->PlatformIsAppleIos()) {
+ if (!this->GlobalGenerator->ShouldStripResourcePath(this->Makefile)) {
flags.MacFolder = "Resources";
}
flags.Type = cmGeneratorTarget::SourceFileTypeResource;