blob: 24aeb7849cbdb411ebfa5f2bc2ac3373d51cc173 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef SIBS_PKGCONFIG_HPP
#define SIBS_PKGCONFIG_HPP
#include "env.hpp"
#include "Result.hpp"
#include <string>
#include <vector>
#include "FileUtil.hpp"
#include "Version.hpp"
namespace sibs
{
class PackageListDependency;
struct PkgConfigFlags
{
std::string linkerFlags;
std::string cflags;
};
class PkgConfig
{
public:
static void setPkgConfigPath(const FileString &path);
static Result<bool> validatePkgConfigPackageVersionExists(PackageListDependency *dependency);
static Result<bool> validatePackageExists(const std::string &name);
static Result<bool> validatePackageVersionAtLeast(const std::string &name, const std::string &version);
static Result<PackageVersion> getPackageVersion(const std::string &name);
static Result<std::string> getDynamicLibsLinkerFlags(const std::vector<PackageListDependency*> &libs);
static Result<std::string> getDynamicLibsCflags(const std::vector<PackageListDependency*> &libs);
static Result<PkgConfigFlags> getDynamicLibsFlags(const std::vector<PackageListDependency*> &libs);
};
}
#endif // SIBS_PKGCONFIG_HPP
|