Use as a Submodule
When using git and CMake for a project, Plasma Engine can be integrated as a submodule into the git repository and referenced from CMake.
First PlasmaEngine needs to be added as a submodule to git:
Additionally, if you want to use the precompiled tools and the sample content from Plasma, you also need to pull in its submodules as well:
Next, add the Plasma Engine folder in your root CMakeLists.txt
:
The Plasma Engine language detection can be reused by including the Plasma Engine submodule utility file:
Strip Unnecessary Code
When integrating Plasma this way, you may only want a subset of the available functionality. For instance, you may only need the plFoundation base library (and 3rd party dependencies). You can achieve this by configuring the build filter
SDK Root Folder
When integrating Plasma as a submodule, it is common for the binaries to be located outside of the Plasma Engine sub-folder, which means the engine won't be able to find the SDK root folder anymore. See this article for ways to fix this.