Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES

For strict backwards compatibility only. This should be unnecessary at
this point, but introducing a policy to deprecate it properly is a
whole different topic branch...
This commit is contained in:
David Cole 2012-02-22 07:14:11 -05:00
parent c21db870a5
commit d899eb71b5
1 changed files with 14 additions and 0 deletions

View File

@ -2127,6 +2127,20 @@ void cmMakefile::ExpandVariables()
this->SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
}
// Also for each target's INCLUDE_DIRECTORIES property:
for (cmTargets::iterator l = this->Targets.begin();
l != this->Targets.end(); ++l)
{
cmTarget &t = l->second;
const char *includeDirs = t.GetProperty("INCLUDE_DIRECTORIES");
if (includeDirs)
{
std::string dirs = includeDirs;
this->ExpandVariablesInString(dirs, true, true);
t.SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
}
}
for(std::vector<std::string>::iterator d = this->LinkDirectories.begin();
d != this->LinkDirectories.end(); ++d)
{