cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget.
This commit is contained in:
parent
110fd2fba1
commit
3e428fdcb4
|
@ -1101,9 +1101,10 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
|
|||
this->SharedLibrariesLinked.insert(target);
|
||||
}
|
||||
|
||||
cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target);
|
||||
// Handle case of an imported shared library with no soname.
|
||||
if(this->NoSONameUsesPath &&
|
||||
target->IsImportedSharedLibWithoutSOName(this->Config))
|
||||
gtgt->IsImportedSharedLibWithoutSOName(this->Config))
|
||||
{
|
||||
this->AddSharedLibNoSOName(item);
|
||||
return;
|
||||
|
|
|
@ -1338,6 +1338,19 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const
|
|||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName(
|
||||
const std::string& config) const
|
||||
{
|
||||
if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
{
|
||||
if(cmTarget::ImportInfo const* info = this->Target->GetImportInfo(config))
|
||||
{
|
||||
return info->NoSOName;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir(
|
||||
|
|
|
@ -415,6 +415,10 @@ public:
|
|||
/** Whether this library defaults to \@rpath. */
|
||||
bool MacOSXRpathInstallNameDirDefault() const;
|
||||
|
||||
/** Test for special case of a third-party shared library that has
|
||||
no soname at all. */
|
||||
bool IsImportedSharedLibWithoutSOName(const std::string& config) const;
|
||||
|
||||
private:
|
||||
friend class cmTargetTraceDependencies;
|
||||
struct SourceEntry { std::vector<cmSourceFile*> Depends; };
|
||||
|
|
|
@ -2177,20 +2177,6 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib) const
|
|||
return "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsImportedSharedLibWithoutSOName(
|
||||
const std::string& config) const
|
||||
{
|
||||
if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
{
|
||||
if(cmTarget::ImportInfo const* info = this->GetImportInfo(config))
|
||||
{
|
||||
return info->NoSOName;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string
|
||||
cmTarget::GetFullNameImported(const std::string& config, bool implib) const
|
||||
|
|
|
@ -244,10 +244,6 @@ public:
|
|||
void
|
||||
GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const;
|
||||
|
||||
/** Test for special case of a third-party shared library that has
|
||||
no soname at all. */
|
||||
bool IsImportedSharedLibWithoutSOName(const std::string& config) const;
|
||||
|
||||
/** Does this target have a GNU implib to convert to MS format? */
|
||||
bool HasImplibGNUtoMS() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue