summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-08-10 19:45:03 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-08-16 21:02:10 (GMT)
commit9110d0eab4ed3b024ad485eaaf15b1d7e4c38744 (patch)
tree1e58cc6e676238b9bf42a7e3de53202f2beac0cf /Source/cmExtraEclipseCDT4Generator.cxx
parentd97b38529efb22579216c406c104c49ea89ba617 (diff)
downloadCMake-9110d0eab4ed3b024ad485eaaf15b1d7e4c38744.zip
CMake-9110d0eab4ed3b024ad485eaaf15b1d7e4c38744.tar.gz
CMake-9110d0eab4ed3b024ad485eaaf15b1d7e4c38744.tar.bz2
Eclipse on OSX: improve handling of framework include dirs (#13367)
It seems that if cmake finds something like the following: /System/Library/Frameworks/GLUT.framework/Headers Eclipse doesn't like that and wants to have /System/Library/Frameworks instead Alex
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 5c7d400..99ca375 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -610,6 +610,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 frameworkRegex("(.+/Frameworks)/.+\\.framework/");
+ if(frameworkRegex.find(dir.c_str()))
+ {
+ dir = frameworkRegex.match(1);
+ }
+
if(emittedDirs.find(dir) == emittedDirs.end())
{
emittedDirs.insert(dir);