From d7f15209385e17580d911bcc10f78c921bd8c3fd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 20 Jan 2013 11:25:35 +0100 Subject: [PATCH] Don't wrap all targets in LINK_LIBRARIES in a TARGET_NAME genex. It is not necessary and the current state is unintentional. Before this patch, target_link_libraries(foo bar) causes the LINK_LIBRARIES property of foo to contain $ instead of just bar --- Source/cmTarget.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 815da408c..077eeecbe 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2269,8 +2269,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());