summaryrefslogtreecommitdiffstats
path: root/Source
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
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')
-rw-r--r--Source/cmTarget.cxx28
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h5
2 files changed, 33 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,
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index ca651d0..e390343 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -109,6 +109,11 @@ public:
" INTERFACE_POSITION_INDEPENDENT_CODE: Sets POSITION_INDEPENDENT_CODE\n"
" or checked for consistency with existing value\n"
"\n"
+ "If an <item> is a library in a Mac OX framework, the Headers "
+ "directory of the framework will also be processed as a \"usage "
+ "requirement\". This has the same effect as passing the framework "
+ "directory as an include directory."
+ "\n"
" target_link_libraries(<target> LINK_INTERFACE_LIBRARIES\n"
" [[debug|optimized|general] <lib>] ...)\n"
"The LINK_INTERFACE_LIBRARIES mode appends the libraries "