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
This commit is contained in:
parent
d97b38529e
commit
9110d0eab4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue