[vcpkg] Fix build command for packages that depend of features
MODIFY
include/vcpkg/build.h
include/vcpkg/build.h
@@ -104,11 +104,11 @@ namespace vcpkg::Build
struct ExtendedBuildResult
{
ExtendedBuildResult(BuildResult code);
- ExtendedBuildResult(BuildResult code, std::vector<PackageSpec>&& unmet_deps);
+ ExtendedBuildResult(BuildResult code, std::vector<FeatureSpec>&& unmet_deps);
ExtendedBuildResult(BuildResult code, std::unique_ptr<BinaryControlFile>&& bcf);
BuildResult code;
- std::vector<PackageSpec> unmet_dependencies;
+ std::vector<FeatureSpec> unmet_dependencies;
std::unique_ptr<BinaryControlFile> binary_control_file;
};

MODIFY
src/vcpkg/build.cpp
src/vcpkg/build.cpp
@@ -267,13 +267,16 @@ namespace vcpkg::Build
const Triplet& triplet = config.triplet;
{
- std::vector<PackageSpec> missing_specs;
+ std::vector<FeatureSpec> missing_specs;
for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet))
{
- auto dep_spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO);
- if (!status_db.is_installed(dep_spec))
+ auto dep_specs = FeatureSpec::from_strings_and_triplet({dep}, triplet);
+ for (auto&& feature : dep_specs)
{
- missing_specs.push_back(std::move(dep_spec));
+ if (!status_db.is_installed(feature))
+ {
+ missing_specs.push_back(std::move(feature));
+ }
}
}
// Fail the build if any dependencies were missing
@@ -600,7 +603,7 @@ namespace vcpkg::Build
: code(code), binary_control_file(std::move(bcf))
{
}
- ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::vector<PackageSpec>&& unmet_deps)
+ ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::vector<FeatureSpec>&& unmet_deps)
: code(code), unmet_dependencies(std::move(unmet_deps))
{
}

[vcpkg] Fix build command for packages that depend of features

Signed-off-by: Squareys <squareys@googlemail.com>