FOnline Engine
Current master GitHub
Documentation Docs/en/reference/cmake/stages.md

CMake Project Stages and Hooks

Generated reference. Do not edit this page directly. Update BuildTools/cmake/ProjectInterface.json, then run python BuildTools/docs_cmake.py --write.

Reference index Canonical JSON model Generation contract

Embedding projects must call every entrypoint exactly once in the order below. Calling a stage twice, calling it out of order, or skipping a predecessor aborts CMake configure.

Register hooks with AddStageHook(<stage> <Pre|Post> <macro-name>) before the target stage executes. Hooks run in registration order.

Order Stable ID Stage Entrypoint Hooks Source Responsibility
1 cmake.stage.Init Init StartProjectGeneration Pre, Post BuildTools/cmake/stages/Init.cmake Declare options, detect the platform/toolchain, and establish common build state.
2 cmake.stage.ProjectOptions ProjectOptions RegisterProjectOptions Pre, Post BuildTools/cmake/stages/ProjectOptions.cmake Normalize project option combinations and reject incompatible build modes.
3 cmake.stage.ThirdParty ThirdParty AddThirdPartyLibraries Pre, Post BuildTools/cmake/stages/ThirdParty.cmake Register bundled third-party dependencies and package lookup isolation.
4 cmake.stage.EngineSources EngineSources RegisterEngineSources Pre, Post BuildTools/cmake/stages/EngineSources.cmake Aggregate engine and embedding-project source lists and generated resource inputs.
5 cmake.stage.Codegen Codegen SetupCodeGeneration Pre, Post BuildTools/cmake/stages/Codegen.cmake Define generated metadata/source outputs and code-generation targets.
6 cmake.stage.CoreLibs CoreLibs BuildCoreLibraries Pre, Post BuildTools/cmake/stages/CoreLibs.cmake Create reusable engine libraries from the registered source groups.
7 cmake.stage.Applications Applications BuildApplications Pre, Post BuildTools/cmake/stages/Applications.cmake Create enabled client, server, mapper, compiler, baker, viewer, and test applications.
8 cmake.stage.ScriptsAndBaking ScriptsAndBaking SetupScriptsAndBaking Pre, Post BuildTools/cmake/stages/ScriptsAndBaking.cmake Create script compilation and resource baking targets.
9 cmake.stage.Packages Packages BuildPackages Pre, Post BuildTools/cmake/stages/Packages.cmake Create package targets from embedding-project package declarations.
10 cmake.stage.Finalize Finalize FinalizeProjectGeneration Pre, Post BuildTools/cmake/stages/Finalize.cmake Finalize target organization and verify that every stage ran exactly once.
Start typing to search.