pkg-config work
This commit is contained in:
parent
3ddb2943bc
commit
fc1964f766
10 changed files with 152 additions and 501 deletions
|
@ -1 +1,5 @@
|
|||
#include "grbc/ext.h"
|
||||
#include "grbc/ext.h"
|
||||
|
||||
void grbc_register_ext(const std::string &extension_id, const Extension &ext) {}
|
||||
|
||||
void grbc_ext(const std::string &extension_id) {}
|
17
src/ext_pkg_config.cc
Normal file
17
src/ext_pkg_config.cc
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "grbc/ext_pkg_config.h"
|
||||
#include "grbc/ext.h"
|
||||
#include "grbc/helpers.h"
|
||||
#include "sol/state.hpp"
|
||||
|
||||
void grbc_pkg_config_init(sol::state &state) {
|
||||
log_msg("pkg_config extension loaded!");
|
||||
}
|
||||
|
||||
|
||||
Extension grbc_pkg_config() {
|
||||
Extension ext{};
|
||||
ext.name = GRBC_EXT_pkg_config_NAME;
|
||||
ext.hook_init = grbc_pkg_config_init;
|
||||
|
||||
return ext;
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
#include "grbc/ext_pkg_config.h"
|
||||
#include "grbc/state.h"
|
||||
#define SOL_ALL_SAFETIES_ON 1
|
||||
|
||||
|
@ -99,12 +100,17 @@ int main() {
|
|||
lua.set("grbc_get_lib_extension", grbc_get_lib_extension);
|
||||
lua.set("grbc_bake_package_config", grbc_bake_package_config);
|
||||
lua.set("grbc_pkg", grbc_pkg);
|
||||
lua.set("grbc_ext", grbc_ext);
|
||||
lua.set("grbc_register_ext", grbc_register_ext);
|
||||
|
||||
// Load generators
|
||||
|
||||
GState::get().generators.push_back(
|
||||
{.name = "ninja", .func = ninja_generator});
|
||||
|
||||
// Load default extensions
|
||||
grbc_register_ext(GRBC_EXT_pkg_config_NAME, grbc_pkg_config());
|
||||
|
||||
log_msg("loading HConfig...");
|
||||
|
||||
lua.script_file("HConfig");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue