grbc/include/grbc/state.h
2024-09-29 14:51:11 -04:00

31 lines
626 B
C++

#pragma once
#include "grbc/ext.h"
#include "grbc/generator.h"
#include "grbc/spec.h"
#include <sol/sol.hpp>
#include <string>
#include <unordered_map>
#include <vector>
struct GState {
Platform current_platform{};
sol::state lua;
std::vector<GeneratorTarget> targets;
std::vector<Generator> generators;
std::unordered_map<std::string, Package> packages;
std::vector<Extension> extensions;
std::string global_compiler_flags = "";
std::string global_linker_flags = "";
std::string ninja_output;
static GState& get() {
static GState state{};
return state;
}
};