grbc/include/grbc/state.h
2024-09-29 15:24:13 -04:00

32 lines
No EOL
665 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<GeneratorTask> tasks;
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;
}
};