cmComputeLinkInformation: Port result API to cmGeneratorTarget.
This commit is contained in:
parent
c7645fca12
commit
7c8236efa7
|
@ -471,7 +471,7 @@ std::vector<std::string> const& cmComputeLinkInformation::GetFrameworkPaths()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::set<cmTarget const*> const&
|
||||
const std::set<const cmGeneratorTarget*>&
|
||||
cmComputeLinkInformation::GetSharedLibrariesLinked()
|
||||
{
|
||||
return this->SharedLibrariesLinked;
|
||||
|
@ -1093,7 +1093,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
|
|||
// Keep track of shared library targets linked.
|
||||
if(target->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
{
|
||||
this->SharedLibrariesLinked.insert(target->Target);
|
||||
this->SharedLibrariesLinked.insert(target);
|
||||
}
|
||||
|
||||
// Handle case of an imported shared library with no soname.
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
class cmake;
|
||||
class cmGlobalGenerator;
|
||||
class cmMakefile;
|
||||
class cmTarget;
|
||||
class cmGeneratorTarget;
|
||||
class cmOrderDirectories;
|
||||
|
||||
|
@ -57,7 +56,7 @@ public:
|
|||
void GetRPath(std::vector<std::string>& runtimeDirs, bool for_install);
|
||||
std::string GetRPathString(bool for_install);
|
||||
std::string GetChrpathString();
|
||||
std::set<cmTarget const*> const& GetSharedLibrariesLinked();
|
||||
std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked();
|
||||
|
||||
std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; }
|
||||
std::string GetRPathLinkString();
|
||||
|
@ -71,7 +70,7 @@ private:
|
|||
std::vector<std::string> Depends;
|
||||
std::vector<std::string> FrameworkPaths;
|
||||
std::vector<std::string> RuntimeSearchPath;
|
||||
std::set<cmTarget const*> SharedLibrariesLinked;
|
||||
std::set<cmGeneratorTarget const*> SharedLibrariesLinked;
|
||||
|
||||
// Context information.
|
||||
cmGeneratorTarget const* Target;
|
||||
|
|
|
@ -563,12 +563,12 @@ cmInstallTargetGenerator
|
|||
std::map<std::string, std::string> install_name_remap;
|
||||
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config))
|
||||
{
|
||||
std::set<cmTarget const*> const& sharedLibs
|
||||
std::set<cmGeneratorTarget const*> const& sharedLibs
|
||||
= cli->GetSharedLibrariesLinked();
|
||||
for(std::set<cmTarget const*>::const_iterator j = sharedLibs.begin();
|
||||
j != sharedLibs.end(); ++j)
|
||||
for(std::set<cmGeneratorTarget const*>::const_iterator j
|
||||
= sharedLibs.begin(); j != sharedLibs.end(); ++j)
|
||||
{
|
||||
cmTarget const* tgt = *j;
|
||||
cmGeneratorTarget const* tgt = *j;
|
||||
|
||||
// The install_name of an imported target does not change.
|
||||
if(tgt->IsImported())
|
||||
|
@ -576,20 +576,17 @@ cmInstallTargetGenerator
|
|||
continue;
|
||||
}
|
||||
|
||||
cmGeneratorTarget *gtgt = tgt->GetMakefile()
|
||||
->GetGlobalGenerator()
|
||||
->GetGeneratorTarget(tgt);
|
||||
// If the build tree and install tree use different path
|
||||
// components of the install_name field then we need to create a
|
||||
// mapping to be applied after installation.
|
||||
std::string for_build = gtgt->GetInstallNameDirForBuildTree(config);
|
||||
std::string for_install = gtgt->GetInstallNameDirForInstallTree();
|
||||
std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
|
||||
std::string for_install = tgt->GetInstallNameDirForInstallTree();
|
||||
if(for_build != for_install)
|
||||
{
|
||||
// The directory portions differ. Append the filename to
|
||||
// create the mapping.
|
||||
std::string fname =
|
||||
this->GetInstallFilename(tgt, config, NameSO);
|
||||
this->GetInstallFilename(tgt->Target, config, NameSO);
|
||||
|
||||
// Map from the build-tree install_name.
|
||||
for_build += fname;
|
||||
|
|
Loading…
Reference in New Issue