aboutsummaryrefslogtreecommitdiff
path: root/include/PkgConfig.hpp
blob: e41b216a4576bf4fff34294b590b9dc1e2dc7b77 (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
#ifndef SIBS_PKGCONFIG_HPP
#define SIBS_PKGCONFIG_HPP

#include "env.hpp"
#if OS_FAMILY == OS_FAMILY_POSIX
#include "Result.hpp"
#include "Dependency.hpp"
#include <string>
#include <vector>

namespace sibs
{
    struct PkgConfigFlags
    {
        std::string linkerFlags;
        std::string cflags;
    };
    
    class PkgConfig
    {
    public:
        static Result<bool> validatePkgConfigPackageVersionExists(const Dependency &dependency);
        static Result<bool> validatePackageExists(const std::string &name);
        static Result<bool> validatePackageVersionAtLeast(const std::string &name, const std::string &version);
        static Result<std::string> getDynamicLibsLinkerFlags(const std::vector<Dependency> &libs);
        static Result<std::string> getDynamicLibsCflags(const std::vector<Dependency> &libs);
        static Result<PkgConfigFlags> getDynamicLibsFlags(const std::vector<Dependency> &libs);
    };
}
#endif // OS_FAMILY_POSIX

#endif // SIBS_PKGCONFIG_HPP