vcpkg/toolsrc/src/SourceParagraph.cpp

17 lines
558 B
C++
Raw Normal View History

2016-09-19 11:50:08 +08:00
#include "SourceParagraph.h"
#include "vcpkglib_helpers.h"
using namespace vcpkg::details;
vcpkg::SourceParagraph::SourceParagraph() = default;
vcpkg::SourceParagraph::SourceParagraph(const std::unordered_map<std::string, std::string>& fields):
name(required_field(fields, "Source")),
version(required_field(fields, "Version")),
description(optional_field(fields, "Description")),
maintainer(optional_field(fields, "Maintainer"))
2016-09-19 11:50:08 +08:00
{
std::string deps = optional_field(fields, "Build-Depends");
this->depends = parse_depends(deps);
2016-09-19 11:50:08 +08:00
}