mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-05 22:28:35 -06:00
cmMakefile: Use public API to find a target
This commit is contained in:
@@ -1248,14 +1248,15 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
|
|||||||
void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
|
void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
|
||||||
const std::string& d)
|
const std::string& d)
|
||||||
{
|
{
|
||||||
cmTargets::iterator i = this->Targets.find(target);
|
cmTarget* t = this->FindLocalNonAliasTarget(target);
|
||||||
if (i == this->Targets.end()) {
|
if (!t) {
|
||||||
cmSystemTools::Error(
|
cmSystemTools::Error(
|
||||||
"Attempt to add link directories to non-existent target: ",
|
"Attempt to add link directories to non-existent target: ",
|
||||||
target.c_str(), " for directory ", d.c_str());
|
target.c_str(), " for directory ", d.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i->second.AddLinkDirectory(d);
|
|
||||||
|
t->AddLinkDirectory(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmMakefile::InitializeFromParent(cmMakefile* parent)
|
void cmMakefile::InitializeFromParent(cmMakefile* parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user