switch to cmake for build system

This commit is contained in:
Nicholas O'Connor
2017-03-23 01:03:33 -07:00
parent 44a831a4b0
commit fc09bf57dc
11 changed files with 30 additions and 52 deletions

34
include/bottles.hpp Normal file
View File

@@ -0,0 +1,34 @@
#ifndef __BOTTLES_HPP
#define __BOTTLES_HPP
#pragma once
#include <map>
#include <string>
#include "json.hpp"
using namespace std;
using json = nlohmann::json;
namespace cellar {
namespace bottles {
enum bottle_type {
bottle_error,
bottle_anonymous,
bottle_labelled,
bottle_symlink
};
class Bottle {
public:
bottle_type type;
json config;
string path;
string canonical_path;
Bottle();
};
map<string, Bottle> get_bottles();
}
}
#endif // __BOTTLES_HPP

9
include/cellar.hpp Normal file
View File

@@ -0,0 +1,9 @@
#ifndef __CELLAR_HPP
#define __CELLAR_HPP
#pragma once
namespace cellar {
void print_header();
}
#endif // __CELLAR_HPP

20
include/commands.hpp Normal file
View File

@@ -0,0 +1,20 @@
#ifndef __COMMANDS_HPP
#define __COMMANDS_HPP
#pragma once
#include <map>
#include <string>
#include <vector>
using namespace std;
namespace cellar {
namespace commands {
typedef void (*CommandFunction)(int, char*[]);
extern map<string, CommandFunction> command_map;
void add_command(string, CommandFunction);
vector<string> list_commands();
}
}
#endif // __COMMANDS_HPP

16
include/fs.hpp Normal file
View File

@@ -0,0 +1,16 @@
#ifndef __FS_HPP
#define __FS_HPP
#pragma once
#include <string>
#include <vector>
using namespace std;
namespace cellar {
namespace fs {
extern vector<string> listdir(string path);
}
}
#endif // __FS_HPP

13003
include/json.hpp Normal file

File diff suppressed because it is too large Load Diff

15
include/version.hpp Normal file
View File

@@ -0,0 +1,15 @@
#ifndef __VERSION_HPP
#define __VERSION_HPP
#pragma once
#include <string>
using namespace std;
namespace cellar {
namespace version {
string short_version();
}
}
#endif // __VERSION_HPP