Table of Contents

ezEngine as a Submodule

When using git and CMake for a project, ezEngine can be integrated as a submodule into the git repository and referenced from CMake.

First ezEngine needs to be added as a submodule to git:

git submodule add

Additionally, if you want to use the precompiled tools and the sample content from EZ, you also need to pull in its submodules as well:

cd ezEngine
git submodule init
git submodule update

Next, add the ezEngine folder in your root CMakeLists.txt:

# Set the build filter, if you only want to integrate parts of EZ into your build.
# set(EZ_BUILD_FILTER "FoundationOnly")


The ezEngine language detection can be reused by including the ezEngine submodule utility file:

# include the EZ submodule utility CMake functions


project("MyProject" LANGUAGES ${EZ_LANGUAGES})

For a full example see:


This kind of integration is useful, if you want to integrate EZ code into your project, for instance, if you want to use ezFoundation as your base library. Since the EZ folder isn't top-level in this setup, using the full engine and all the data located in the data directories won't work out of the box. For additional options, see the CMake setup page.

Strip Unnecessary Code

When integrating EZ this way, you may only want a subset of the available functionality. For instance, you may only need the ezFoundation base library (and 3rd party dependencies). You can achieve this by configuring the build filter

SDK Root Folder

When integrating EZ as a submodule, it is common for the binaries to be located outside of the ezEngine 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.

See Also