diff options
author | Brad King <brad.king@kitware.com> | 2008-01-30 22:25:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-30 22:25:52 (GMT) |
commit | 7902bc06aae07a9d4cde81ab41c3c86694d80a9b (patch) | |
tree | 20810436488a804ffadb37c349d8db594d368a36 /Source/cmComputeLinkDepends.cxx | |
parent | 22be36f8d52fae0f509725253f175b0c1ec65dcc (diff) | |
download | CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.zip CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.gz CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.bz2 |
ENH: Implemented link-interface specification feature.
- Shared libs and executables with exports may now have
explicit transitive link dependencies specified
- Created LINK_INTERFACE_LIBRARIES and related properties
- Exported targets get the interface libraries as their
IMPORTED_LINK_LIBRARIES property.
- The export() and install(EXPORT) commands now give
an error when a linked target is not included since
the user can change the interface libraries instead
of adding the target.
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 6940b7c..1684641 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -263,17 +263,22 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) if(entry.Target) { // Follow the target dependencies. - if(entry.Target->GetType() != cmTarget::EXECUTABLE) + if(entry.Target->IsImported()) { - if(entry.Target->IsImported()) - { - this->AddImportedLinkEntries(depender_index, entry.Target); - } - else - { - this->AddTargetLinkEntries(depender_index, - entry.Target->GetOriginalLinkLibraries()); - } + // Imported targets provide their own link information. + this->AddImportedLinkEntries(depender_index, entry.Target); + } + else if(cmTargetLinkInterface const* interface = + entry.Target->GetLinkInterface(this->Config)) + { + // This target provides its own link interface information. + this->AddLinkEntries(depender_index, *interface); + } + else if(entry.Target->GetType() != cmTarget::EXECUTABLE) + { + // Use the target's link implementation as the interface. + this->AddTargetLinkEntries(depender_index, + entry.Target->GetOriginalLinkLibraries()); } } else |