Skip to main content
PrismaEngine ships a standard CMake package config file (PrismaEngineConfig.cmake) inside its cmake/ directory. Once you point CMake at the SDK root, find_package(PrismaEngine REQUIRED) resolves all include paths, library paths, and imported targets automatically. You can also have CMake download the SDK at configure time using the built-in file(DOWNLOAD ...) mechanism — no manual installation required.

Manual integration

The example below shows a complete CMakeLists.txt that downloads the SDK automatically on first configure, then locates and links it using find_package. This is the recommended approach for projects that want reproducible, version-pinned SDK builds without a separate installation step.
The download only runs when PrismaEngineConfig.cmake is not already present in CMAKE_BINARY_DIR/PrismaEngine-SDK/cmake/. Subsequent configures skip the download entirely.

Using find_package with a pre-installed SDK

If you extracted the SDK manually to a fixed location (for example /opt/PrismaEngine-SDK), you can skip the download block and pass PrismaEngine_DIR at configure time:
Inside CMakeLists.txt, the minimum integration is:
The imported target PrismaEngine::Engine carries include directories, compile options, and library paths — you do not need to call target_include_directories separately unless you have additional local headers.

CMake helper functions

The SDK package config exposes two CMake functions that reduce boilerplate for common project types.

prisma_create_app

prisma_create_app creates a PrismaEngine application target with sensible defaults. It wraps add_executable, sets output directories, and links PrismaEngine::Engine automatically.

prisma_create_editor_extension

prisma_create_editor_extension creates a shared library target intended for use as an editor plugin. It links against the editor SDK and configures the correct output path for the editor to discover the extension at runtime.

CMake variables

These variables control SDK discovery and download behavior. Set them before calling find_package.

Troubleshooting

If CMake cannot find Vulkan headers during engine configuration, install the Vulkan development package for your distribution.
On Windows, download and install the Vulkan SDK from vulkan.lunarg.com. The installer sets the VULKAN_SDK environment variable automatically, which CMake uses to locate headers and libraries.
SDL3 is fetched automatically via CMake FetchContent when PRISMA_USE_FETCHCONTENT=ON (the default). If you are building with PRISMA_USE_FETCHCONTENT=OFF, install SDL3 manually:
On Linux you can also install SDL3 from source or use a distribution package if one is available for your version.
Verify that your compiler version meets the minimum requirements:
If your system compiler is too old, install a newer version or use a toolchain file to point CMake at a supported compiler.