Commit 7ba95492 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmMakefile: Use public API to find a target

parent 6d98b15f
......@@ -1248,14 +1248,15 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
const std::string& d)
{
cmTargets::iterator i = this->Targets.find(target);
if (i == this->Targets.end()) {
cmTarget* t = this->FindLocalNonAliasTarget(target);
if (!t) {
cmSystemTools::Error(
"Attempt to add link directories to non-existent target: ",
target.c_str(), " for directory ", d.c_str());
return;
}
i->second.AddLinkDirectory(d);
t->AddLinkDirectory(d);
}
void cmMakefile::InitializeFromParent(cmMakefile* parent)
......
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