diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-20 10:25:35 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-20 10:25:35 (GMT) |
commit | d7f15209385e17580d911bcc10f78c921bd8c3fd (patch) | |
tree | bf0444688452befb5db38eb50ea0424d9f809b02 | |
parent | 5e572619c67c5ba38a68179111f7dea9648690ab (diff) | |
download | CMake-d7f15209385e17580d911bcc10f78c921bd8c3fd.zip CMake-d7f15209385e17580d911bcc10f78c921bd8c3fd.tar.gz CMake-d7f15209385e17580d911bcc10f78c921bd8c3fd.tar.bz2 |
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
$<TARGET_NAME:bar>
instead of just
bar
-rw-r--r-- | Source/cmTarget.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 815da40..077eeec 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()); |