vcpkg/toolsrc/include/SourceParagraph.h

36 lines
853 B
C
Raw Normal View History

2016-09-19 11:50:08 +08:00
#pragma once
#include <unordered_map>
#include <vector>
2016-09-19 11:50:08 +08:00
namespace vcpkg
{
2017-04-04 06:02:45 +08:00
struct Triplet;
2017-04-04 06:12:42 +08:00
struct Dependency
{
std::string name;
std::string qualifier;
};
const std::string& to_string(const Dependency& dep);
2016-09-19 11:50:08 +08:00
struct SourceParagraph
{
SourceParagraph();
explicit SourceParagraph(std::unordered_map<std::string, std::string> fields);
2016-09-19 11:50:08 +08:00
std::string name;
std::string version;
std::string description;
std::string maintainer;
2017-04-04 06:12:42 +08:00
std::vector<Dependency> depends;
2016-09-19 11:50:08 +08:00
};
2017-04-04 06:12:42 +08:00
std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
2017-04-04 06:12:42 +08:00
std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
std::vector<std::string> parse_depends(const std::string& depends_string);
2016-09-19 11:50:08 +08:00
}