Properly link flecs library

This commit is contained in:
2023-11-09 11:38:29 +01:00
parent dc585396c3
commit 8edcf9305c
1392 changed files with 390081 additions and 164 deletions

View File

@@ -0,0 +1,31 @@
#ifndef ${id upper}_H
#define ${id upper}_H
/* This generated file contains includes for project dependencies */
#include "${id dash}/bake_config.h"
// Reflection system boilerplate
#undef ECS_META_IMPL
#ifndef ${id underscore}_EXPORTS
#define ECS_META_IMPL EXTERN // Ensure meta symbols are only defined once
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
ECS_STRUCT(MyComponent) {
float x;
float y;
});
*/
void ${id pascalcase}Import(
ecs_world_t *world);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,7 @@
{
"id": "flecs.module",
"type": "template",
"value": {
"use": ["flecs"]
}
}

View File

@@ -0,0 +1,9 @@
#include <${id underscore}.h>
void ${id pascalcase}Import(
ecs_world_t *world)
{
ECS_MODULE(world, ${id pascalcase});
// ECS_COMPONENT_DEFINE(world, MyComponent);
}

View File

@@ -0,0 +1,16 @@
#ifndef ${id upper}_H
#define ${id upper}_H
/* This generated file contains includes for project dependencies */
#include "${id dash}/bake_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,7 @@
{
"id": "flecs",
"type": "template",
"value": {
"use": ["flecs"]
}
}

View File

@@ -0,0 +1,16 @@
#include <${id underscore}.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
ecs_world_t *world = ecs_init_w_args(argc, argv);
/* Set target FPS for main loop */
ecs_set_target_fps(world, 60);
printf("Application ${id} is running, press CTRL-C to exit...\n");
/* Run systems */
while ( ecs_progress(world, 0));
return ecs_fini(world);
}

View File

@@ -0,0 +1,16 @@
#ifndef ${id upper}_H
#define ${id upper}_H
/* This generated file contains includes for project dependencies */
#include "${id dash}/bake_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,8 @@
{
"id": "flecs",
"type": "template",
"value": {
"use": ["flecs"],
"language": "c++"
}
}

View File

@@ -0,0 +1,13 @@
#include <${id underscore}.h>
#include <iostream>
int main(int argc, char *argv[]) {
flecs::world world(argc, argv);
world.set_target_fps(1);
std::cout << "Application ${id} is running, press CTRL-C to exit..." << std::endl;
/* Run systems */
while (world.progress()) { }
}