diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 19e59d79d..25660dc7a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2279,8 +2279,9 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, cmTarget *tgt = this->Makefile->FindTargetToUse(lib); const bool isNonImportedTarget = tgt && !tgt->IsImported(); - std::string libName = isNonImportedTarget ? targetNameGenex(lib) - : std::string(lib); + const std::string libName = (isNonImportedTarget && llt != GENERAL) + ? targetNameGenex(lib) + : std::string(lib); this->AppendProperty("LINK_LIBRARIES", this->GetDebugGeneratorExpressions(libName, llt).c_str());