|
|
@@ -1550,10 +1550,10 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
|
|
|
this->LocalGenerator->GetIncludeDirectories(includes,
|
|
|
this->GeneratorTarget,
|
|
|
"C", config);
|
|
|
- std::vector<std::string>::iterator i;
|
|
|
// check all include directories for frameworks as this
|
|
|
// will already have added a -F for the framework
|
|
|
- for(i = includes.begin(); i != includes.end(); ++i)
|
|
|
+ for(std::vector<std::string>::iterator i = includes.begin();
|
|
|
+ i != includes.end(); ++i)
|
|
|
{
|
|
|
if(this->Target->NameResolvesToFramework(i->c_str()))
|
|
|
{
|
|
|
@@ -1565,17 +1565,21 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
|
|
|
}
|
|
|
|
|
|
std::string flags;
|
|
|
- std::vector<std::string>& frameworks = this->Target->GetFrameworks();
|
|
|
- for(i = frameworks.begin();
|
|
|
- i != frameworks.end(); ++i)
|
|
|
+ const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
|
|
|
+ if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
|
|
{
|
|
|
- if(emitted.insert(*i).second)
|
|
|
+ std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
|
|
+ for(std::vector<std::string>::const_iterator i = frameworks.begin();
|
|
|
+ i != frameworks.end(); ++i)
|
|
|
{
|
|
|
- flags += "-F";
|
|
|
- flags += this->Convert(i->c_str(),
|
|
|
- cmLocalGenerator::START_OUTPUT,
|
|
|
- cmLocalGenerator::SHELL, true);
|
|
|
- flags += " ";
|
|
|
+ if(emitted.insert(*i).second)
|
|
|
+ {
|
|
|
+ flags += "-F";
|
|
|
+ flags += this->Convert(i->c_str(),
|
|
|
+ cmLocalGenerator::START_OUTPUT,
|
|
|
+ cmLocalGenerator::SHELL, true);
|
|
|
+ flags += " ";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return flags;
|