summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-24 15:50:49 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-07-24 15:50:49 (GMT)
commit828ddb68139a080594c2e6a96d57cb9e93d2ccb3 (patch)
treeda62c9e8bdf7e3212b914ce846f4e06e77a8b98f /Source/cmTarget.cxx
parente31c4bd9a6dbb00e5b1b4dbc651ad56cbb0526ef (diff)
parentf5ca872e8b621bbef1c5feb92317bc420fe07716 (diff)
downloadCMake-828ddb68139a080594c2e6a96d57cb9e93d2ccb3.zip
CMake-828ddb68139a080594c2e6a96d57cb9e93d2ccb3.tar.gz
CMake-828ddb68139a080594c2e6a96d57cb9e93d2ccb3.tar.bz2
Merge topic 'framework-interface-includes'
f5ca872 Use linked frameworks as a source of include directories.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1df9f2b..26bf9b7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3341,6 +3341,34 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
new cmTargetInternals::TargetPropertyEntry(cge,
it->Value));
}
+
+ if(this->Makefile->IsOn("APPLE"))
+ {
+ LinkImplementation const* impl = this->GetLinkImplementation(config,
+ this);
+ for(std::vector<std::string>::const_iterator
+ it = impl->Libraries.begin();
+ it != impl->Libraries.end(); ++it)
+ {
+ std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
+
+ static cmsys::RegularExpression
+ frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
+ if(!frameworkCheck.find(libDir))
+ {
+ continue;
+ }
+
+ libDir = frameworkCheck.match(1);
+
+ cmGeneratorExpression ge(lfbt);
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(libDir.c_str());
+ this->Internal
+ ->CachedLinkInterfaceIncludeDirectoriesEntries[configString]
+ .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
+ }
+ }
}
processIncludeDirectories(this,