diff options
author | Brad King <brad.king@kitware.com> | 2016-01-19 14:35:46 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-01-19 14:35:46 (GMT) |
commit | 249aac71d0b0022031d16963f3b46f9860919104 (patch) | |
tree | ff2289aef4303647bc105488a8b81b4379be121b /Source | |
parent | f8f531584716e732a8f0da44e285e996cb172574 (diff) | |
parent | aea1b03617bed037bbd12af36d7ef92feff0ba74 (diff) | |
download | CMake-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.cxx | 7 |
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 + ">"; } |