diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-12-10 15:39:22 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-12-10 19:57:28 (GMT) |
commit | bab24e782c1bf56ef7263e91e5cf78879699a036 (patch) | |
tree | 2be453e95172a5134100afd077b76de7b27da3ce /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 8c7367e3f0e5e104630857561b4730a0b32253f9 (diff) | |
download | CMake-bab24e782c1bf56ef7263e91e5cf78879699a036.zip CMake-bab24e782c1bf56ef7263e91e5cf78879699a036.tar.gz CMake-bab24e782c1bf56ef7263e91e5cf78879699a036.tar.bz2 |
target_link_libraries: Propagate dependencies of object libraries
Prior to this commit, linking against an object library did not
propagate private link dependencies of object libraries to their
consuming targets. This change implements the correct behavior.
Fixes: #18692
Co-Author: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 66cc6ee..eebf7a0 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -451,7 +451,8 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, // STATIC library.) if (this->CurrentProcessingState == ProcessingKeywordPrivateInterface || this->CurrentProcessingState == ProcessingPlainPrivateInterface) { - if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || + this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(libRef, llt); if (cmGeneratorExpression::IsValidTargetName(libRef) || |