aboutsummaryrefslogtreecommitdiff
path: root/src/PkgConfig.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-04 01:01:35 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-04 01:01:42 +0100
commita548abb5a6a83c9318e9db3cf71170a7610e2758 (patch)
treee8556530f15102054f6175dc7a3438aaaaf8d77e /src/PkgConfig.cpp
parente862bb76a2f4c9c293fe2638c7fb034de2af709c (diff)
Use packages list to find packages
Diffstat (limited to 'src/PkgConfig.cpp')
-rw-r--r--src/PkgConfig.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/PkgConfig.cpp b/src/PkgConfig.cpp
index a66d5b3..f9f8f9b 100644
--- a/src/PkgConfig.cpp
+++ b/src/PkgConfig.cpp
@@ -18,6 +18,21 @@ namespace sibs
}
return input;
}
+
+#if OS_FAMILY == OS_FAMILY_POSIX
+ Result<bool> PkgConfig::validatePkgConfigPackageVersionExists(const Dependency &dependency)
+ {
+ Result<bool> dependencyValidationResult = PkgConfig::validatePackageExists(dependency.name);
+ if(dependencyValidationResult.isErr())
+ return Result<bool>::Err(dependencyValidationResult.getErrMsg());
+
+ Result<bool> dependencyVersionValidationResult = PkgConfig::validatePackageVersionAtLeast(dependency.name, dependency.version);
+ if(dependencyVersionValidationResult.isErr())
+ return Result<bool>::Err(dependencyVersionValidationResult.getErrMsg());
+
+ return Result<bool>::Ok(true);
+ }
+#endif
Result<bool> PkgConfig::validatePackageExists(const string &name)
{