diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 42dd428197..6e2e23da5f 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -39,17 +39,10 @@ void cmGeneratorTarget::ClassifySources() { cmSourceFile* sf = *si; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); - cmTarget::SourceFileFlags tsFlags = - this->Target->GetTargetSourceFileFlags(sf); if(sf->GetCustomCommand()) { this->CustomCommands.push_back(sf); } - else if(tsFlags.Type != cmTarget::SourceFileTypeNormal) - { - this->OSXContent.push_back(sf); - if(isObjLib) { badObjLib.push_back(sf); } - } else if(sf->GetPropertyAsBool("HEADER_FILE_ONLY")) { this->HeaderSources.push_back(sf); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 3e50656039..5c7578d94a 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -37,7 +37,6 @@ public: std::vector HeaderSources; std::vector ObjectSources; std::vector ExternalObjects; - std::vector OSXContent; std::vector IDLSources; std::string ModuleDefinitionFile; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a0e04813da..408f287bc1 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -153,14 +153,8 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() } } } - for(std::vector::const_iterator - si = this->GeneratorTarget->OSXContent.begin(); - si != this->GeneratorTarget->OSXContent.end(); ++si) - { - cmTarget::SourceFileFlags tsFlags = - this->Target->GetTargetSourceFileFlags(*si); - this->WriteMacOSXContentRules(**si, tsFlags.MacFolder); - } + this->WriteMacOSXContentRules(this->GeneratorTarget->HeaderSources); + this->WriteMacOSXContentRules(this->GeneratorTarget->ExtraSources); for(std::vector::const_iterator si = this->GeneratorTarget->ExternalObjects.begin(); si != this->GeneratorTarget->ExternalObjects.end(); ++si) @@ -353,6 +347,22 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags() } } +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteMacOSXContentRules( + std::vector const& sources) +{ + for(std::vector::const_iterator + si = sources.begin(); si != sources.end(); ++si) + { + cmTarget::SourceFileFlags tsFlags = + this->Target->GetTargetSourceFileFlags(*si); + if(tsFlags.Type != cmTarget::SourceFileTypeNormal) + { + this->WriteMacOSXContentRules(**si, tsFlags.MacFolder); + } + } +} + //---------------------------------------------------------------------------- void cmMakefileTargetGenerator::WriteMacOSXContentRules(cmSourceFile& source, const char* pkgloc) diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index e1e554b6ee..36a1f6861d 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -73,6 +73,7 @@ protected: void WriteTargetDependRules(); // write rules for Mac OS X Application Bundle content. + void WriteMacOSXContentRules(std::vector const& sources); void WriteMacOSXContentRules(cmSourceFile& source, const char* pkgloc); // write the rules for an object diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index c6469f2c9c..80007f1077 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -396,7 +396,6 @@ cmNinjaTargetGenerator cmCustomCommand const* cc = (*si)->GetCustomCommand(); this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget()); } - // TODO: this->GeneratorTarget->OSXContent for(std::vector::const_iterator si = this->GeneratorTarget->ExternalObjects.begin(); si != this->GeneratorTarget->ExternalObjects.end(); ++si)