build: separate plugins build from core build#51
Merged
Conversation
3 tasks
…re to make them safer
Contributor
Author
|
I tested it on VkWrapper-Test and SB-Test-Scene and it works! |
ripel2
approved these changes
Nov 11, 2024
MasterLaplace
pushed a commit
that referenced
this pull request
Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.
`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder
Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).
A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.
For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
MasterLaplace
pushed a commit
that referenced
this pull request
Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.
`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder
Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).
A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.
For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
MasterLaplace
pushed a commit
that referenced
this pull request
Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.
`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder
Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).
A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.
For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've created
EngineSquaredCoreandPlugins separated build system.EngineSquaredCorerepresents core engine that can be used without any dependencies and that can be used for anypurpose. It is contained insidesrc/enginefolderEach plugins are self contained inside there respertive folders inside
src/pluginfolder. Plugins have anxmake.luato create their statics libraries. They also have their own unit tests management. Unit tests can be called recursively like before (xmake testat the root of the repository).A typical plugin's folder should contains only 5 things:
xmake.lua: to build the plugin and allow to run tests.gitignore: if you build only the wanted plugin inside its folder, it will create.xmakeandbuildfolders and we don't want to push them.srcfolder: used to store only source filestestsfolder (optional): used to store only tests files. It can be unnecessary when you create lib that can't be tested (Windowplugin for example)src/global_plugin_header.hpp(optional): You can add an header file that contains all header of the plugin. For example,Objectplugin containsObject.hppthat include all headers of the plugins. It can unnecessary sometimes, for exampleWindowplugin have only one useful header file namedWindow.hppthat declare aWindowclass.For now, we use them for the
EngineSquaredlibrary that contains all plugins and core features. If you add a new plugin, don't forget to include it insideREPO_ROOT/xmake.lualikeincludes("src/plugin/your-plugin/xmake.lua")and add it inEngineSquaredtarget like add_deps("PluginYourPlugin").