Properly link flecs library
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
Reference in New Issue
Block a user