[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1250-g8475dd3
Brad King
brad.king at kitware.com
Fri Dec 7 15:49:23 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 8475dd356cfaad9caaee49223b42582f94d9d8db (commit)
via 65dd18fcadcb469b1eda3c39533d56e0bd6b6771 (commit)
from 607d6b144c7c7a4622e1bbff1099aa0fc6a1e221 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8475dd356cfaad9caaee49223b42582f94d9d8db
commit 8475dd356cfaad9caaee49223b42582f94d9d8db
Merge: 607d6b1 65dd18f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 15:49:17 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 7 15:49:17 2012 -0500
Merge topic 'xcode-framework-paths' into next
65dd18f Xcode: Restore include directories in framework paths
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65dd18fcadcb469b1eda3c39533d56e0bd6b6771
commit 65dd18fcadcb469b1eda3c39533d56e0bd6b6771
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 15:09:31 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 7 15:10:46 2012 -0500
Xcode: Restore include directories in framework paths
The grandparent commit mistakenly removed the transformation of
include_directories of the form /path/to/Foo.framework to framework
search path options like -F/path/to. Restore it and move the addition
of framework search paths needed for linking so that we add paths in
only one place.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index cbe6dad..b2d325c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1971,15 +1971,53 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
+ BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
std::vector<std::string> includes;
this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt,
"C", configName);
+ std::set<cmStdString> emitted;
+ emitted.insert("/System/Library/Frameworks");
for(std::vector<std::string>::iterator i = includes.begin();
i != includes.end(); ++i)
{
- std::string incpath =
- this->XCodeEscapePath(i->c_str());
- dirs.Add(incpath.c_str());
+ if(this->NameResolvesToFramework(i->c_str()))
+ {
+ std::string frameworkDir = *i;
+ frameworkDir += "/../";
+ frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
+ if(emitted.insert(frameworkDir).second)
+ {
+ fdirs.Add(this->XCodeEscapePath(frameworkDir.c_str()).c_str());
+ }
+ }
+ else
+ {
+ std::string incpath =
+ this->XCodeEscapePath(i->c_str());
+ 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))
+ {
+ 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)
+ {
+ fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
+ }
+ }
+ }
+ }
+ if(!fdirs.IsEmpty())
+ {
+ buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
+ fdirs.CreateList());
}
if(!dirs.IsEmpty())
{
@@ -2658,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;
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalXCodeGenerator.cxx | 63 ++++++++++++++++++++++++-------------
1 files changed, 41 insertions(+), 22 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list