diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 56e0ed933..9983e5d78 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3590,6 +3590,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name) return imported->second; } + // Look for a target built in this directory. + if(cmTarget* t = this->FindTarget(name)) + { + return t; + } + // Look for a target built in this project. return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name); }