Commit 48f8b6ac authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmExportFileGenerator: Evaluate genex with cmGeneratorTarget.

parent f2791da1
......@@ -436,7 +436,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
ImportPropertyMap &properties,
std::vector<std::string> &missingTargets)
{
cmTarget *target = tei->Target;
cmGeneratorTarget *target = tei->Target->GetMakefile()
->GetGlobalGenerator()
->GetGeneratorTarget(tei->Target);
assert(preprocessRule == cmGeneratorExpression::InstallInterface);
const char *propName = "INTERFACE_INCLUDE_DIRECTORIES";
......@@ -450,12 +452,12 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
true);
this->ReplaceInstallPrefix(dirs);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs);
std::string exportDirs = cge->Evaluate(target->GetMakefile(), "",
false, target);
std::string exportDirs = cge->Evaluate(target->Target->GetMakefile(), "",
false, target->Target);
if (cge->GetHadContextSensitiveCondition())
{
cmMakefile* mf = target->GetMakefile();
cmMakefile* mf = target->Target->GetMakefile();
std::ostringstream e;
e << "Target \"" << target->GetName() << "\" is installed with "
"INCLUDES DESTINATION set to a context sensitive path. Paths which "
......@@ -486,10 +488,10 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
true);
if (!prepro.empty())
{
this->ResolveTargetsInGeneratorExpressions(prepro, target,
this->ResolveTargetsInGeneratorExpressions(prepro, target->Target,
missingTargets);
if (!checkInterfaceDirs(prepro, target, propName))
if (!checkInterfaceDirs(prepro, target->Target, propName))
{
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment