Add package_spec::display_name()

This commit is contained in:
Alexander Karatarakis 2017-01-30 12:45:26 -08:00
parent 884cd176b0
commit 4d10454167
3 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,8 @@ namespace vcpkg
const triplet& target_triplet() const;
std::string display_name() const;
std::string dir() const;
std::string toString() const;

View File

@ -71,7 +71,7 @@ namespace vcpkg
std::string BinaryParagraph::displayname() const
{
return Strings::format("%s:%s", this->spec.name(), this->spec.target_triplet());
return this->spec.display_name();
}
std::string BinaryParagraph::dir() const

View File

@ -50,6 +50,11 @@ namespace vcpkg
return this->m_target_triplet;
}
std::string package_spec::display_name() const
{
return Strings::format("%s:%s", this->name(), this->target_triplet());
}
std::string package_spec::dir() const
{
return Strings::format("%s_%s", this->m_name, this->m_target_triplet);
@ -57,7 +62,7 @@ namespace vcpkg
std::string package_spec::toString() const
{
return Strings::format("%s:%s", this->name(), this->target_triplet());
return this->display_name();
}
std::string to_printf_arg(const package_spec& spec)