BUG: Do not try to compute the location of a non-library target for linking.

This commit is contained in:
Brad King 2006-10-13 10:03:54 -04:00
parent 2f713072c7
commit 023041362d
1 changed files with 3 additions and 1 deletions

View File

@ -1629,7 +1629,9 @@ void cmLocalGenerator
{ {
// Compute the proper name to use to link this library. // Compute the proper name to use to link this library.
cmTarget* tgt = this->GlobalGenerator->FindTarget(0, lib.c_str()); cmTarget* tgt = this->GlobalGenerator->FindTarget(0, lib.c_str());
if(tgt) if(tgt && (tgt->GetType() == cmTarget::STATIC_LIBRARY ||
tgt->GetType() == cmTarget::SHARED_LIBRARY ||
tgt->GetType() == cmTarget::MODULE_LIBRARY))
{ {
// This is a CMake target. Ask the target for its real name. // This is a CMake target. Ask the target for its real name.
// Pass the full path to the target file but purposely leave // Pass the full path to the target file but purposely leave