feat(deps): resolve pkg-config modules
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 4s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / fuzz-clang (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 49s
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 4s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / fuzz-clang (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 49s
This commit is contained in:
1 parent
f8e0036b37
commit
ce041ace07
13 files changed
+663
-12
No files matched your search
@@ -953,6 +953,20 @@ Dependency &Dependency::archive(std::string url, std::string sha256) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Dependency &Dependency::pkgconfig(std::string spec) {
|
||||
require_text(spec, "pkg-config module spec");
|
||||
auto state = owner(owner_);
|
||||
auto &record = state->dependencies.at(index_);
|
||||
if (record.source_kind != DependencySourceKind::Unspecified || !record.builder.empty()) {
|
||||
throw std::invalid_argument{"dependency '" + record.name +
|
||||
"' already has a source/provider"};
|
||||
}
|
||||
record.source_kind = DependencySourceKind::PkgConfig;
|
||||
record.builder = "pkgconfig";
|
||||
record.location = std::move(spec);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Dependency &Dependency::cmake(OptionMap options) {
|
||||
for (const auto &[key, value] : options) {
|
||||
(void)value;
|
||||
@@ -1293,6 +1307,9 @@ std::string Project::to_json() const {
|
||||
case DependencySourceKind::Conan:
|
||||
result += "\"conan\",\"package\":" + json_quote(dependency.package);
|
||||
break;
|
||||
case DependencySourceKind::PkgConfig:
|
||||
result += "\"pkgconfig\",\"location\":" + json_quote(dependency.location);
|
||||
break;
|
||||
case DependencySourceKind::Unspecified:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user