summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-08-20 19:41:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-20 19:41:14 (GMT)
commite04245e2d59180924ba8534df2f753c08921a49e (patch)
treefb3718360e21abfc5e32ef7250564380bd1556f1 /Source/cmExtraEclipseCDT4Generator.cxx
parent407ccb495752de28e788842275fd798ef9fcc02a (diff)
parenta3815e67cf9ff7f542e809d8974b695893a6a783 (diff)
downloadCMake-e04245e2d59180924ba8534df2f753c08921a49e.zip
CMake-e04245e2d59180924ba8534df2f753c08921a49e.tar.gz
CMake-e04245e2d59180924ba8534df2f753c08921a49e.tar.bz2
Merge topic 'HandleMacFrameworkIncludeDirs_13465'
a3815e6 -fix line length 9110d0e Eclipse on OSX: improve handling of framework include dirs (#13367) d97b385 Eclipse on OSX: fix handling of framework include dirs (#13464)
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index eccc2c1..1f976f7 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -598,6 +598,16 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
if (!inc->empty())
{
std::string dir = cmSystemTools::CollapseFullPath(inc->c_str());
+
+ // handle framework include dirs on OSX, the remainder after the
+ // Frameworks/ part has to be stripped
+ // /System/Library/Frameworks/GLUT.framework/Headers
+ cmsys::RegularExpression frameworkRx("(.+/Frameworks)/.+\\.framework/");
+ if(frameworkRx.find(dir.c_str()))
+ {
+ dir = frameworkRx.match(1);
+ }
+
if(emittedDirs.find(dir) == emittedDirs.end())
{
emittedDirs.insert(dir);