Build
To support multiple native build toolchains, Open 3D Engine (O3DE) uses the CMake build tools . While most configurable build systems make it difficult to work cross-platform, CMake is intentionally designed to take generic configuration files and generate toolchain-specific project files, and then perform native builds.
Once you’ve registered O3DE and created an O3DE project, you can build your project with these commands:
cd <project-directory>
cmake -B build/windows -S . -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<absolute-path-to-packages>
cmake --build build/windows --target <ProjectName>.GameLauncher Editor --config profile -- -m
Note:UseVisual Studio 16as the generator for Visual Studio 2019, andVisual Studio 17for Visual Studio 2022. For a complete list of common generators for each supported platform, refer to Configuring projects.
Important:When building using the O3DE pre-build Snap SDK, first export theO3DE_SNAPenvironment variable so CMake does not attempt to install Python pip requirements and fail. To export theO3DE_SNAPenvironment variable, run the commandexport O3DE_SNAPfrom the command line before running the CMake commands below.
cd <project-directory>
cmake -B build/linux -S . -G "Ninja Multi-Config" -DLY_3RDPARTY_PATH=<absolute-path-to-packages>
cmake --build build/linux --target <ProjectName>.GameLauncher Editor --config profile
Builds created with these commands are located in the <project-directory>/<build-directory>/bin/profile directory.
Refer to Configure and Build for a list of other build configurations.
O3DE requires CMake 3.30.0 or higher. Older versions may still work for now, but this will become a mandatory minimum after the O3DE 26.05 release.
Section topics
| Topic | Description |
|---|---|
| Configure and Build | The full details on how to configure and build O3DE core, Gems, and projects. |
| Build Generated Source Files | Learn how to use the AzAutoGen automation tool to generate source files when building a target. |
| Engine and Project Distribution | Instructions on how to separate engine developer and project developer workflows, by creating fixed binaries to distribute to project teams. |
| O3DE Packages | Learn about the O3DE package system that’s used to ship binaries along with your Gem or project. |
| Troubleshooting | How to debug and troubleshoot CMake and build problems. |
| CMake Settings Reference | Reference for user-configurable CMake settings specific to O3DE. |
| Script-Only ‘Quick-Start’ Projects | Details about Script only ‘Quick Start’ projects. |
| Templates | Information about Project, Gem, and other Templates available in the engine |
Related topics
| Topic | Description |
|---|---|
| Windows Support | Prerequisites for building on Windows 10. |
| Linux Support | Prerequisites for building on Linux. |
Configure and Build
Learn how to use the CMake build tools with Open 3D Engine (O3DE).
Project and Gem Templates
Learn about the project and gem templates available in O3DE
Script-Only ‘Quick Start’ Projects
Describes how Script-only ‘Quick Start’ projects work in O3DE
Build Generated Source Files
Learn how to integrate AzAutoGen into Open 3D Engine (O3DE), so it can generate source files when building a target using CMake.
Engine and Project Distribution
Learn the process for building a full bundle of libraries and executables that you can distribute to internal teams to use your customized version of Open 3D Engine (O3DE).
O3DE Packages
Integrate dependencies as packages into Open 3D Engine (O3DE) Gems or projects using the CMake build system.
Troubleshooting
Tips, tricks, and advice for fixing failing O3DE builds.
CMake Settings Reference
The reference for Open 3D Engine-specific CMake settings.