cmGeneratorTarget: Move HasImportLibrary from cmTarget.
This commit is contained in:
parent
8d2e3e53b9
commit
526cc7dc52
|
@ -1658,7 +1658,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactLinkerTag>
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
return target->GetFullPath(context->Config,
|
return target->GetFullPath(context->Config,
|
||||||
target->Target->HasImportLibrary());
|
target->HasImportLibrary());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5487,7 +5487,7 @@ cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmGeneratorTarget::HasImplibGNUtoMS() const
|
bool cmGeneratorTarget::HasImplibGNUtoMS() const
|
||||||
{
|
{
|
||||||
return this->Target->HasImportLibrary()
|
return this->HasImportLibrary()
|
||||||
&& this->GetPropertyAsBool("GNUtoMS");
|
&& this->GetPropertyAsBool("GNUtoMS");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5504,3 +5504,11 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName,
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool cmGeneratorTarget::HasImportLibrary() const
|
||||||
|
{
|
||||||
|
return (this->Target->IsDLLPlatform() &&
|
||||||
|
(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||||
|
this->Target->IsExecutableWithExports()));
|
||||||
|
}
|
||||||
|
|
|
@ -398,6 +398,9 @@ public:
|
||||||
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
|
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
|
||||||
const char* newExt = 0) const;
|
const char* newExt = 0) const;
|
||||||
|
|
||||||
|
/** Return whether or not the target has a DLL import library. */
|
||||||
|
bool HasImportLibrary() const;
|
||||||
|
|
||||||
struct SourceFileFlags
|
struct SourceFileFlags
|
||||||
GetTargetSourceFileFlags(const cmSourceFile* sf) const;
|
GetTargetSourceFileFlags(const cmSourceFile* sf) const;
|
||||||
|
|
||||||
|
|
|
@ -559,7 +559,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
vars["TARGET_IMPLIB"] = impLibPath;
|
vars["TARGET_IMPLIB"] = impLibPath;
|
||||||
EnsureParentDirectoryExists(impLibPath);
|
EnsureParentDirectoryExists(impLibPath);
|
||||||
if(target.HasImportLibrary())
|
if(genTarget.HasImportLibrary())
|
||||||
{
|
{
|
||||||
byproducts.push_back(targetOutputImplib);
|
byproducts.push_back(targetOutputImplib);
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,9 +262,6 @@ public:
|
||||||
/** Return whether or not the target is for a DLL platform. */
|
/** Return whether or not the target is for a DLL platform. */
|
||||||
bool IsDLLPlatform() const { return this->DLLPlatform; }
|
bool IsDLLPlatform() const { return this->DLLPlatform; }
|
||||||
|
|
||||||
/** Return whether or not the target has a DLL import library. */
|
|
||||||
bool HasImportLibrary() const;
|
|
||||||
|
|
||||||
/** Return whether this target is a shared library Framework on
|
/** Return whether this target is a shared library Framework on
|
||||||
Apple. */
|
Apple. */
|
||||||
bool IsFrameworkOnApple() const;
|
bool IsFrameworkOnApple() const;
|
||||||
|
@ -463,6 +460,9 @@ private:
|
||||||
|
|
||||||
void MaybeInvalidatePropertyCache(const std::string& prop);
|
void MaybeInvalidatePropertyCache(const std::string& prop);
|
||||||
|
|
||||||
|
/** Return whether or not the target has a DLL import library. */
|
||||||
|
bool HasImportLibrary() const;
|
||||||
|
|
||||||
// Internal representation details.
|
// Internal representation details.
|
||||||
friend class cmTargetInternals;
|
friend class cmTargetInternals;
|
||||||
friend class cmGeneratorTarget;
|
friend class cmGeneratorTarget;
|
||||||
|
|
Loading…
Reference in New Issue