diff options
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 10 |
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); |