Properly link flecs library
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#ifndef DEFINE_DEBUG_AND_SANITIZE_H
|
||||
#define DEFINE_DEBUG_AND_SANITIZE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "define_debug_and_sanitize/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef DEFINE_DEBUG_AND_SANITIZE_BAKE_CONFIG_H
|
||||
#define DEFINE_DEBUG_AND_SANITIZE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include <flecs.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "define_debug_and_sanitize",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_DEBUG", "FLECS_SANITIZE"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <define_debug_and_sanitize.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
return ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/c/log/include/log.h
Normal file
16
engine/libs/flecs/test/custom_builds/c/log/include/log.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "log/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef LOG_BAKE_CONFIG_H
|
||||
#define LOG_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/log/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/log/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "log",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_LOG"]
|
||||
}
|
||||
}
|
||||
7
engine/libs/flecs/test/custom_builds/c/log/src/main.c
Normal file
7
engine/libs/flecs/test/custom_builds/c/log/src/main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <log.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/c/meta/include/meta.h
Normal file
16
engine/libs/flecs/test/custom_builds/c/meta/include/meta.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef META_H
|
||||
#define META_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "meta/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef META_BAKE_CONFIG_H
|
||||
#define META_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/meta/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/meta/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "meta",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_META"]
|
||||
}
|
||||
}
|
||||
15
engine/libs/flecs/test/custom_builds/c/meta/src/main.c
Normal file
15
engine/libs/flecs/test/custom_builds/c/meta/src/main.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <meta.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ecs_entity_t s = ecs_struct_init(world, &(ecs_struct_desc_t){
|
||||
.members = {
|
||||
{ .name = "x", .type = ecs_id(ecs_i32_t) },
|
||||
{ .name = "y", .type = ecs_id(ecs_i32_t) }
|
||||
}
|
||||
});
|
||||
assert(s != 0);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef META_C_H
|
||||
#define META_C_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "meta_c/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef META_C_BAKE_CONFIG_H
|
||||
#define META_C_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/meta_c/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/meta_c/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "meta_c",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_META_C"]
|
||||
}
|
||||
}
|
||||
14
engine/libs/flecs/test/custom_builds/c/meta_c/src/main.c
Normal file
14
engine/libs/flecs/test/custom_builds/c/meta_c/src/main.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <meta_c.h>
|
||||
|
||||
ECS_STRUCT(Position, {
|
||||
float x;
|
||||
float y;
|
||||
});
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_META_COMPONENT(world, Position);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
5
engine/libs/flecs/test/custom_builds/c/module/.gitignore
vendored
Normal file
5
engine/libs/flecs/test/custom_builds/c/module/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.bake_cache
|
||||
.DS_Store
|
||||
.vscode
|
||||
gcov
|
||||
bin
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "module/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef MODULE_BAKE_CONFIG_H
|
||||
#define MODULE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
13
engine/libs/flecs/test/custom_builds/c/module/src/main.c
Normal file
13
engine/libs/flecs/test/custom_builds/c/module/src/main.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <module.h>
|
||||
|
||||
void MyModuleImport(ecs_world_t *world) {
|
||||
ECS_MODULE(world, MyModule);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_IMPORT(world, MyModule);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef REST_H
|
||||
#define REST_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "monitor/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef MONITOR_BAKE_CONFIG_H
|
||||
#define MONITOR_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/monitor/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/monitor/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "monitor",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_MONITOR", "FLECS_LOG"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <monitor.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_IMPORT(world, FlecsMonitor);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef MONITOR_REST_H
|
||||
#define MONITOR_REST_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "monitor_rest/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef MONITOR_REST_BAKE_CONFIG_H
|
||||
#define MONITOR_REST_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "monitor_rest",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_MONITOR", "FLECS_REST", "FLECS_LOG"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <monitor_rest.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_IMPORT(world, FlecsMonitor);
|
||||
ECS_IMPORT(world, FlecsRest);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef NO_ADDONS_H
|
||||
#define NO_ADDONS_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "no_addons/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef NO_ADDONS_BAKE_CONFIG_H
|
||||
#define NO_ADDONS_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "no_addons",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <no_addons.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef NO_LOG_H
|
||||
#define NO_LOG_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "no_log/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef NO_LOG_BAKE_CONFIG_H
|
||||
#define NO_LOG_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/no_log/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/no_log/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "no_log",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_NO_LOG"]
|
||||
}
|
||||
}
|
||||
12
engine/libs/flecs/test/custom_builds/c/no_log/src/main.c
Normal file
12
engine/libs/flecs/test/custom_builds/c/no_log/src/main.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <no_log.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
assert(ecs_should_log(-1) == false);
|
||||
assert(ecs_should_log(0) == false);
|
||||
assert(ecs_should_log(1) == false);
|
||||
assert(ecs_should_log(2) == false);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef PIPELINE_H
|
||||
#define PIPELINE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "pipeline/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PIPELINE_BAKE_CONFIG_H
|
||||
#define PIPELINE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/pipeline/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/pipeline/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "pipeline",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_PIPELINE"]
|
||||
}
|
||||
}
|
||||
41
engine/libs/flecs/test/custom_builds/c/pipeline/src/main.c
Normal file
41
engine/libs/flecs/test/custom_builds/c/pipeline/src/main.c
Normal file
@@ -0,0 +1,41 @@
|
||||
#include <pipeline.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x, y;
|
||||
} Position, Velocity;
|
||||
|
||||
void Move(ecs_iter_t *it) {
|
||||
Position *p = ecs_field(it, Position, 1);
|
||||
Velocity *v = ecs_field(it, Velocity, 2);
|
||||
|
||||
for (int i = 0; i < it->count; i ++) {
|
||||
p[i].x += v[i].x;
|
||||
p[i].y += v[i].y;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_COMPONENT(world, Position);
|
||||
ECS_COMPONENT(world, Velocity);
|
||||
|
||||
ecs_entity_t s = ecs_system_init(world, &(ecs_system_desc_t){
|
||||
.entity = ecs_entity(world, {.add = { ecs_dependson(EcsOnUpdate) }}),
|
||||
.query.filter.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
|
||||
.callback = Move
|
||||
});
|
||||
assert(s != 0);
|
||||
|
||||
ecs_entity_t e = ecs_new_id(world);
|
||||
ecs_set(world, e, Position, {10, 20});
|
||||
ecs_set(world, e, Velocity, {1, 2});
|
||||
|
||||
ecs_progress(world, 0);
|
||||
|
||||
const Position *p = ecs_get(world, e, Position);
|
||||
assert(p->x == 11);
|
||||
assert(p->y == 22);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PIPELINE_BAKE_CONFIG_H
|
||||
#define PIPELINE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef PIPELINE_W_SYSTEM_H
|
||||
#define PIPELINE_W_SYSTEM_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "pipeline_w_system/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PIPELINE_W_SYSTEM_BAKE_CONFIG_H
|
||||
#define PIPELINE_W_SYSTEM_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "pipeline_w_system",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_PIPELINE", "FLECS_SYSTEM"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#include <pipeline_w_system.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x, y;
|
||||
} Position, Velocity;
|
||||
|
||||
void Move(ecs_iter_t *it) {
|
||||
Position *p = ecs_field(it, Position, 1);
|
||||
Velocity *v = ecs_field(it, Velocity, 2);
|
||||
|
||||
for (int i = 0; i < it->count; i ++) {
|
||||
p[i].x += v[i].x;
|
||||
p[i].y += v[i].y;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_COMPONENT(world, Position);
|
||||
ECS_COMPONENT(world, Velocity);
|
||||
|
||||
ecs_entity_t s = ecs_system_init(world, &(ecs_system_desc_t){
|
||||
.entity = ecs_entity(world, { .add = {ecs_dependson(EcsOnUpdate)} }),
|
||||
.query.filter.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
|
||||
.callback = Move
|
||||
});
|
||||
assert(s != 0);
|
||||
|
||||
ecs_entity_t e = ecs_new_id(world);
|
||||
ecs_set(world, e, Position, {10, 20});
|
||||
ecs_set(world, e, Velocity, {1, 2});
|
||||
|
||||
ecs_progress(world, 0);
|
||||
|
||||
const Position *p = ecs_get(world, e, Position);
|
||||
assert(p->x == 11);
|
||||
assert(p->y == 22);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/c/plecs/include/plecs.h
Normal file
16
engine/libs/flecs/test/custom_builds/c/plecs/include/plecs.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef PLECS_H
|
||||
#define PLECS_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "plecs/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PLECS_BAKE_CONFIG_H
|
||||
#define PLECS_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/plecs/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/plecs/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "plecs",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_PLECS"]
|
||||
}
|
||||
}
|
||||
11
engine/libs/flecs/test/custom_builds/c/plecs/src/main.c
Normal file
11
engine/libs/flecs/test/custom_builds/c/plecs/src/main.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <plecs.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
int ret = ecs_plecs_from_str(world, NULL, "Foo");
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef PLECS_W_PARSER_H
|
||||
#define PLECS_W_PARSER_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "plecs_w_parser/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PLECS_W_PARSER_BAKE_CONFIG_H
|
||||
#define PLECS_W_PARSER_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "plecs_w_parser",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_PLECS", "FLECS_PARSER"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <plecs_w_parser.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
int ret = ecs_plecs_from_str(world, NULL, "Foo");
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/c/rest/include/rest.h
Normal file
16
engine/libs/flecs/test/custom_builds/c/rest/include/rest.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef REST_H
|
||||
#define REST_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "rest/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef REST_BAKE_CONFIG_H
|
||||
#define REST_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/rest/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/rest/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "rest",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_REST"]
|
||||
}
|
||||
}
|
||||
9
engine/libs/flecs/test/custom_builds/c/rest/src/main.c
Normal file
9
engine/libs/flecs/test/custom_builds/c/rest/src/main.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <rest.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ecs_set(world, 0, EcsRest, {0});
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef GNU2X_H
|
||||
#define GNU2X_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "gnu2x/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef GNU2X_BAKE_CONFIG_H
|
||||
#define GNU2X_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "gnu2x",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true,
|
||||
"public": false
|
||||
},
|
||||
"lang.c": {
|
||||
"c-standard": "gnu2x"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <gnu2x.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
return ecs_fini(world);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef SYSTEM_H
|
||||
#define SYSTEM_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "system/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef SYSTEM_BAKE_CONFIG_H
|
||||
#define SYSTEM_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/system/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/system/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "system",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_SYSTEM"]
|
||||
}
|
||||
}
|
||||
40
engine/libs/flecs/test/custom_builds/c/system/src/main.c
Normal file
40
engine/libs/flecs/test/custom_builds/c/system/src/main.c
Normal file
@@ -0,0 +1,40 @@
|
||||
#include <system.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x, y;
|
||||
} Position, Velocity;
|
||||
|
||||
void Move(ecs_iter_t *it) {
|
||||
Position *p = ecs_field(it, Position, 1);
|
||||
Velocity *v = ecs_field(it, Velocity, 2);
|
||||
|
||||
for (int i = 0; i < it->count; i ++) {
|
||||
p[i].x += v[i].x;
|
||||
p[i].y += v[i].y;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_COMPONENT(world, Position);
|
||||
ECS_COMPONENT(world, Velocity);
|
||||
|
||||
ecs_entity_t s = ecs_system_init(world, &(ecs_system_desc_t){
|
||||
.query.filter.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
|
||||
.callback = Move,
|
||||
});
|
||||
assert(s != 0);
|
||||
|
||||
ecs_entity_t e = ecs_new_id(world);
|
||||
ecs_set(world, e, Position, {10, 20});
|
||||
ecs_set(world, e, Velocity, {1, 2});
|
||||
|
||||
ecs_run(world, s, 0, 0);
|
||||
|
||||
const Position *p = ecs_get(world, e, Position);
|
||||
assert(p->x == 11);
|
||||
assert(p->y == 22);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/c/timer/include/timer.h
Normal file
16
engine/libs/flecs/test/custom_builds/c/timer/include/timer.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "timer/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef TIMER_BAKE_CONFIG_H
|
||||
#define TIMER_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
14
engine/libs/flecs/test/custom_builds/c/timer/project.json
Normal file
14
engine/libs/flecs/test/custom_builds/c/timer/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "timer",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"public": false,
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"standalone": true
|
||||
},
|
||||
"lang.c": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_TIMER"]
|
||||
}
|
||||
}
|
||||
52
engine/libs/flecs/test/custom_builds/c/timer/src/main.c
Normal file
52
engine/libs/flecs/test/custom_builds/c/timer/src/main.c
Normal file
@@ -0,0 +1,52 @@
|
||||
#include <timer.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x, y;
|
||||
} Position, Velocity;
|
||||
|
||||
void Move(ecs_iter_t *it) {
|
||||
Position *p = ecs_field(it, Position, 1);
|
||||
Velocity *v = ecs_field(it, Velocity, 2);
|
||||
|
||||
for (int i = 0; i < it->count; i ++) {
|
||||
p[i].x += v[i].x;
|
||||
p[i].y += v[i].y;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
ecs_world_t *world = ecs_init_w_args(argc, argv);
|
||||
|
||||
ECS_COMPONENT(world, Position);
|
||||
ECS_COMPONENT(world, Velocity);
|
||||
|
||||
ecs_entity_t s = ecs_system_init(world, &(ecs_system_desc_t){
|
||||
.query.filter.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
|
||||
.callback = Move,
|
||||
.entity = ecs_entity(world, {.add = {ecs_dependson(EcsOnUpdate)}}),
|
||||
.interval = 2.9f
|
||||
});
|
||||
assert(s != 0);
|
||||
|
||||
EcsTimer *timer = ecs_get_mut(world, s, EcsTimer);
|
||||
timer->time = 0;
|
||||
|
||||
ecs_entity_t e = ecs_new_id(world);
|
||||
ecs_set(world, e, Position, {10, 20});
|
||||
ecs_set(world, e, Velocity, {1, 2});
|
||||
|
||||
const Position *p = ecs_get(world, e, Position);
|
||||
|
||||
ecs_progress(world, 1.0);
|
||||
ecs_progress(world, 1.0);
|
||||
|
||||
assert(p->x == 10);
|
||||
assert(p->y == 20);
|
||||
|
||||
ecs_progress(world, 1.0);
|
||||
|
||||
assert(p->x == 11);
|
||||
assert(p->y == 22);
|
||||
|
||||
return ecs_fini(world);
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/cpp/app/include/app.h
Normal file
16
engine/libs/flecs/test/custom_builds/cpp/app/include/app.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef APP_H
|
||||
#define APP_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "app/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef APP_BAKE_CONFIG_H
|
||||
#define APP_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
15
engine/libs/flecs/test/custom_builds/cpp/app/project.json
Normal file
15
engine/libs/flecs/test/custom_builds/cpp/app/project.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "app",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP", "FLECS_APP"]
|
||||
}
|
||||
}
|
||||
11
engine/libs/flecs/test/custom_builds/cpp/app/src/main.cpp
Normal file
11
engine/libs/flecs/test/custom_builds/cpp/app/src/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <app.h>
|
||||
|
||||
int main(int, char *[]) {
|
||||
flecs::world ecs;
|
||||
|
||||
ecs.system().iter([](flecs::iter& it) {
|
||||
it.world().quit();
|
||||
});
|
||||
|
||||
return ecs.app().run();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef DLL_APP_H
|
||||
#define DLL_APP_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "dll_app/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef DLL_APP_BAKE_CONFIG_H
|
||||
#define DLL_APP_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include <flecs.h>
|
||||
#include <dll_module.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "dll_app",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs", "dll_module"
|
||||
],
|
||||
"language": "c++"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <dll_app.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
flecs::world world(argc, argv);
|
||||
|
||||
world.import<movement::module>();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef DLL_MODULE_H
|
||||
#define DLL_MODULE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "dll_module/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
namespace movement
|
||||
{
|
||||
struct Position {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct Velocity {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct DLL_MODULE_API module {
|
||||
module(flecs::world& world);
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef DLL_MODULE_BAKE_CONFIG_H
|
||||
#define DLL_MODULE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include <flecs.h>
|
||||
|
||||
/* Convenience macro for exporting symbols */
|
||||
#ifndef dll_module_STATIC
|
||||
#if defined(dll_module_EXPORTS) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
#define DLL_MODULE_API __declspec(dllexport)
|
||||
#elif defined(dll_module_EXPORTS)
|
||||
#define DLL_MODULE_API __attribute__((__visibility__("default")))
|
||||
#elif defined(_MSC_VER)
|
||||
#define DLL_MODULE_API __declspec(dllimport)
|
||||
#else
|
||||
#define DLL_MODULE_API
|
||||
#endif
|
||||
#else
|
||||
#define DLL_MODULE_API
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "dll_module",
|
||||
"type": "package",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"language": "c++"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <dll_module.h>
|
||||
|
||||
namespace movement
|
||||
{
|
||||
module::module(flecs::world& ecs) {
|
||||
ecs.module<module>();
|
||||
|
||||
ecs.component<Position>();
|
||||
ecs.component<Velocity>();
|
||||
}
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/cpp/doc/include/doc.h
Normal file
16
engine/libs/flecs/test/custom_builds/cpp/doc/include/doc.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef DOC_H
|
||||
#define DOC_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "doc/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef DOC_BAKE_CONFIG_H
|
||||
#define DOC_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
15
engine/libs/flecs/test/custom_builds/cpp/doc/project.json
Normal file
15
engine/libs/flecs/test/custom_builds/cpp/doc/project.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "doc",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP", "FLECS_DOC"]
|
||||
}
|
||||
}
|
||||
15
engine/libs/flecs/test/custom_builds/cpp/doc/src/main.cpp
Normal file
15
engine/libs/flecs/test/custom_builds/cpp/doc/src/main.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <doc.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int, char *[]) {
|
||||
flecs::world world;
|
||||
|
||||
auto e = world.entity();
|
||||
flecs::doc::set_brief(e, "brief");
|
||||
flecs::doc::set_detail(e, "detail");
|
||||
flecs::doc::set_link(e, "link");
|
||||
|
||||
assert(!strcmp(flecs::doc::get_brief(e), "brief"));
|
||||
assert(!strcmp(flecs::doc::get_detail(e), "detail"));
|
||||
assert(!strcmp(flecs::doc::get_link(e), "link"));
|
||||
}
|
||||
16
engine/libs/flecs/test/custom_builds/cpp/log/include/log.h
Normal file
16
engine/libs/flecs/test/custom_builds/cpp/log/include/log.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "log/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef LOG_BAKE_CONFIG_H
|
||||
#define LOG_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
15
engine/libs/flecs/test/custom_builds/cpp/log/project.json
Normal file
15
engine/libs/flecs/test/custom_builds/cpp/log/project.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "log",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP", "FLECS_LOG"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <log.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int, char *[]) {
|
||||
flecs::world world;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "module/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef MODULE_BAKE_CONFIG_H
|
||||
#define MODULE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
15
engine/libs/flecs/test/custom_builds/cpp/module/project.json
Normal file
15
engine/libs/flecs/test/custom_builds/cpp/module/project.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "module",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP", "FLECS_MODULE"]
|
||||
}
|
||||
}
|
||||
14
engine/libs/flecs/test/custom_builds/cpp/module/src/main.cpp
Normal file
14
engine/libs/flecs/test/custom_builds/cpp/module/src/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <module.h>
|
||||
#include <iostream>
|
||||
|
||||
struct my_module {
|
||||
my_module(flecs::world& world) {
|
||||
world.module<my_module>();
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
flecs::world world(argc, argv);
|
||||
|
||||
world.import<my_module>();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef NO_ADDONS_H
|
||||
#define NO_ADDONS_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "no_addons/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef NO_ADDONS_BAKE_CONFIG_H
|
||||
#define NO_ADDONS_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "no_addons",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <no_addons.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int, char *[]) {
|
||||
flecs::world world;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef PIPELINE_H
|
||||
#define PIPELINE_H
|
||||
|
||||
/* This generated file contains includes for project dependencies */
|
||||
#include "pipeline/bake_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
)
|
||||
(.)
|
||||
.|.
|
||||
| |
|
||||
_.--| |--._
|
||||
.-'; ;`-'& ; `&.
|
||||
\ & ; & &_/
|
||||
|"""---...---"""|
|
||||
\ | | | | | | | /
|
||||
`---.|.|.|.---'
|
||||
|
||||
* This file is generated by bake.lang.c for your convenience. Headers of
|
||||
* dependencies will automatically show up in this file. Include bake_config.h
|
||||
* in your main project file. Do not edit! */
|
||||
|
||||
#ifndef PIPELINE_BAKE_CONFIG_H
|
||||
#define PIPELINE_BAKE_CONFIG_H
|
||||
|
||||
/* Headers of public dependencies */
|
||||
#include "../../deps/flecs.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "pipeline",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"public": false,
|
||||
"standalone": true,
|
||||
"language": "c++"
|
||||
},
|
||||
"lang.cpp": {
|
||||
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_CPP", "FLECS_PIPELINE"]
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user