summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-29 20:47:18 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-29 20:47:18 (GMT)
commit319c4c4d8033d8c37f320839196ed174c4674fdf (patch)
treed4fc94a1a40578b6c17ef21bea87642f642fe894 /Source/cmComputeLinkInformation.cxx
parent6e70424fc85ad81f60c589dd01cc127af1be0fad (diff)
downloadCMake-319c4c4d8033d8c37f320839196ed174c4674fdf.zip
CMake-319c4c4d8033d8c37f320839196ed174c4674fdf.tar.gz
CMake-319c4c4d8033d8c37f320839196ed174c4674fdf.tar.bz2
ENH: Update cmInstallTargetGenerator to get the shared libraries linked by a target from cmComputeLinkInformation instead of duplicating the computation.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 190ffb8..990b8e5 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -284,6 +284,13 @@ std::vector<std::string> const& cmComputeLinkInformation::GetFrameworkPaths()
}
//----------------------------------------------------------------------------
+std::set<cmTarget*> const&
+cmComputeLinkInformation::GetSharedLibrariesLinked()
+{
+ return this->SharedLibrariesLinked;
+}
+
+//----------------------------------------------------------------------------
bool cmComputeLinkInformation::Compute()
{
// Skip targets that do not link.
@@ -340,6 +347,12 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
return;
}
+ // Keep track of shared libraries linked.
+ if(tgt && tgt->GetType() == cmTarget::SHARED_LIBRARY)
+ {
+ this->SharedLibrariesLinked.insert(tgt);
+ }
+
if(tgt && (tgt->GetType() == cmTarget::STATIC_LIBRARY ||
tgt->GetType() == cmTarget::SHARED_LIBRARY ||
tgt->GetType() == cmTarget::MODULE_LIBRARY ||