summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-19 14:35:46 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-01-19 14:35:46 (GMT)
commit249aac71d0b0022031d16963f3b46f9860919104 (patch)
treeff2289aef4303647bc105488a8b81b4379be121b /Source
parentf8f531584716e732a8f0da44e285e996cb172574 (diff)
parentaea1b03617bed037bbd12af36d7ef92feff0ba74 (diff)
downloadCMake-249aac71d0b0022031d16963f3b46f9860919104.zip
CMake-249aac71d0b0022031d16963f3b46f9860919104.tar.gz
CMake-249aac71d0b0022031d16963f3b46f9860919104.tar.bz2
Merge topic 'export-static-private-depend'
aea1b036 Fix export of STATIC library PRIVATE dependencies with CMP0022 NEW e5cbec14 Tests: Use CMP0022 NEW behavior in some ExportImport cases 0ca122fc Tests: Isolate policy changes in ExportImport test
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 435346a..5f3246a 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -432,8 +432,11 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
{
std::string configLib = this->Target
->GetDebugGeneratorExpressions(lib, llt);
- if (cmGeneratorExpression::IsValidTargetName(lib)
- || cmGeneratorExpression::Find(lib) != std::string::npos)
+ if (cmGeneratorExpression::IsValidTargetName(configLib))
+ {
+ configLib = "$<LINK_ONLY:$<TARGET_NAME:" + configLib + ">>";
+ }
+ else if (cmGeneratorExpression::Find(configLib) != std::string::npos)
{
configLib = "$<LINK_ONLY:" + configLib + ">";
}