aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/vcpkglib.h
blob: bd2400b7788069b16c84d78f0e513396b4e389c4 (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
36
37
38
39
40
#pragma once

#include "SortedVector.h"
#include "StatusParagraphs.h"
#include "VcpkgPaths.h"

namespace vcpkg
{
    extern bool g_debugging;

    StatusParagraphs database_load_check(const VcpkgPaths& paths);

    void write_update(const VcpkgPaths& paths, const StatusParagraph& p);

    struct StatusParagraphAndAssociatedFiles
    {
        StatusParagraph pgh;
        SortedVector<std::string> files;
    };

    std::vector<StatusParagraph*> get_installed_ports(const StatusParagraphs& status_db);
    std::vector<StatusParagraphAndAssociatedFiles> get_installed_files(const VcpkgPaths& paths,
                                                                       const StatusParagraphs& status_db);

    struct CMakeVariable
    {
        CMakeVariable(const CWStringView varname, const wchar_t* varvalue);
        CMakeVariable(const CWStringView varname, const std::string& varvalue);
        CMakeVariable(const CWStringView varname, const std::wstring& varvalue);
        CMakeVariable(const CWStringView varname, const fs::path& path);

        std::wstring s;
    };

    std::wstring make_cmake_cmd(const fs::path& cmake_exe,
                                const fs::path& cmake_script,
                                const std::vector<CMakeVariable>& pass_variables);

    std::string shorten_description(const std::string& desc);
} // namespace vcpkg