summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-08 14:59:03 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-24 15:49:06 (GMT)
commitf5ca872e8b621bbef1c5feb92317bc420fe07716 (patch)
tree006c70de5dc42a9ac504eb9948c4d7e1cf2e793d /Source/cmTarget.cxx
parentf82c751d7b3ee3907d780060985a36bdddcabad3 (diff)
downloadCMake-f5ca872e8b621bbef1c5feb92317bc420fe07716.zip
CMake-f5ca872e8b621bbef1c5feb92317bc420fe07716.tar.gz
CMake-f5ca872e8b621bbef1c5feb92317bc420fe07716.tar.bz2
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 70500cd..994e053 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3344,6 +3344,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,