|
|
@@ -1997,15 +1997,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
|
|
dirs.Add(incpath.c_str());
|
|
|
}
|
|
|
}
|
|
|
- std::vector<std::string>& frameworks = target.GetFrameworks();
|
|
|
- if(frameworks.size())
|
|
|
+ if(target.GetType() != cmTarget::OBJECT_LIBRARY &&
|
|
|
+ target.GetType() != cmTarget::STATIC_LIBRARY)
|
|
|
{
|
|
|
- for(std::vector<std::string>::iterator fmIt = frameworks.begin();
|
|
|
- fmIt != frameworks.end(); ++fmIt)
|
|
|
+ // Add framework search paths needed for linking.
|
|
|
+ if(cmComputeLinkInformation* cli = target.GetLinkInformation(configName))
|
|
|
{
|
|
|
- if(emitted.insert(*fmIt).second)
|
|
|
+ std::vector<std::string> const& fwDirs = cli->GetFrameworkPaths();
|
|
|
+ for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
|
|
|
+ fdi != fwDirs.end(); ++fdi)
|
|
|
{
|
|
|
- fdirs.Add(this->XCodeEscapePath(fmIt->c_str()).c_str());
|
|
|
+ if(emitted.insert(*fdi).second)
|
|
|
+ {
|
|
|
+ fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2691,25 +2696,6 @@ void cmGlobalXCodeGenerator
|
|
|
linkDirs.c_str(), configName);
|
|
|
}
|
|
|
|
|
|
- // add the framework search paths
|
|
|
- {
|
|
|
- const char* sep = "";
|
|
|
- std::string fdirs;
|
|
|
- std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
|
|
|
- for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
|
|
|
- fdi != fwDirs.end(); ++fdi)
|
|
|
- {
|
|
|
- fdirs += sep;
|
|
|
- sep = " ";
|
|
|
- fdirs += this->XCodeEscapePath(fdi->c_str());
|
|
|
- }
|
|
|
- if(!fdirs.empty())
|
|
|
- {
|
|
|
- this->AppendBuildSettingAttribute(target, "FRAMEWORK_SEARCH_PATHS",
|
|
|
- fdirs.c_str(), configName);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// now add the link libraries
|
|
|
{
|
|
|
std::string linkLibs;
|