summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-04 13:49:40 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-04 13:49:40 (GMT)
commit21a0beacc1d8c452f13453b22f36c91fbbd0a182 (patch)
tree780b5dc39afc62a5210dd1aef291849b4bb88be8 /Source
parentf0d938549eead63fb86bec28c299a1bceacbdd6b (diff)
downloadCMake-21a0beacc1d8c452f13453b22f36c91fbbd0a182.zip
CMake-21a0beacc1d8c452f13453b22f36c91fbbd0a182.tar.gz
CMake-21a0beacc1d8c452f13453b22f36c91fbbd0a182.tar.bz2
Xcode: Fix framework search paths in STATIC library targets (#14191)
In commit 2bc22bda (Xcode: Add frameworks search paths from link dependeny closure, 2012-12-07) we made framework search paths from the link closure conditional on target type, skipping it on STATIC and OBJECT library targets that do not actually link. However, the framework search paths also influence the compile lines (-F options) so we need them for all target types. The Makefile generator already does this, as did the Xcode generator prior to the above-mentioned commit.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b2d325c..0f59c02 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1997,20 +1997,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
dirs.Add(incpath.c_str());
}
}
- if(target.GetType() != cmTarget::OBJECT_LIBRARY &&
- target.GetType() != cmTarget::STATIC_LIBRARY)
+ // Add framework search paths needed for linking.
+ if(cmComputeLinkInformation* cli = target.GetLinkInformation(configName))
{
- // Add framework search paths needed for linking.
- if(cmComputeLinkInformation* cli = target.GetLinkInformation(configName))
+ std::vector<std::string> const& fwDirs = cli->GetFrameworkPaths();
+ for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
+ fdi != fwDirs.end(); ++fdi)
{
- std::vector<std::string> const& fwDirs = cli->GetFrameworkPaths();
- for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
- fdi != fwDirs.end(); ++fdi)
+ if(emitted.insert(*fdi).second)
{
- if(emitted.insert(*fdi).second)
- {
- fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
- }
+ fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
}
}
}