Documentation
Docs/en/reference/cmake/helpers.md
CMake Project Helpers
Generated reference. Do not edit this page directly. Update
BuildTools/cmake/ProjectInterface.json, then runpython BuildTools/docs_cmake.py --write.
| Reference index | Canonical JSON model | Generation contract |
These commands are the selected project-facing helper surface. Other commands under BuildTools/cmake remain internal unless they are added to the interface manifest.
| Stable ID | Signature | Kind | Allowed roles | Source | Description |
|---|---|---|---|---|---|
cmake.helper.SetOption |
SetOption(<name> <value>) |
function |
- | BuildTools/Init.cmake | Set an embedding-project default only when the variable is not already defined. An FO_ name must be a declared option: a retired name fails at the call with its replacement, and any other undeclared FO_ name fails once the Init stage has declared the options. SetOptionValues applies the same name check. |
cmake.helper.AddStageHook |
AddStageHook(<stage> <Pre|Post> <macro-name>) |
macro |
- | BuildTools/Init.cmake | Register a project macro at a stage boundary before that stage executes. |
cmake.helper.RegisterFindPackageHandler |
RegisterFindPackageHandler(<package> <handler-macro>) |
macro |
- | BuildTools/Init.cmake | Register the explicit package lookup handler used by the ThirdParty-stage find_package interceptor. |
cmake.helper.AddEngineSources |
AddEngineSources(<role> <path-or-glob> [<role> <path-or-glob> ...]) |
macro |
COMMON, SERVER, CLIENT, MAPPER, BAKER, TESTS |
BuildTools/cmake/helpers/Build.cmake | Add role-scoped embedding-project native sources before RegisterEngineSources. |
cmake.helper.AddNativeIncludeDir |
AddNativeIncludeDir(<directory> [...]) |
macro |
- | BuildTools/cmake/helpers/Build.cmake | Add project-relative include directories when Native scripting is enabled. |
cmake.helper.AddBakingTarget |
AddBakingTarget(<target> [SUB_CONFIG <name>] [FORCE] [COMMENT <text>]) |
function |
- | BuildTools/cmake/stages/ScriptsAndBaking.cmake | Create a project baking target with an optional subconfig, force mode, and build-hash update after SetupScriptsAndBaking. |
cmake.helper.CopyTargetRuntimeToTarget |
CopyTargetRuntimeToTarget(<consumer-target> <producer-target>) |
function |
- | BuildTools/cmake/helpers/Build.cmake | Build the producer before the consumer and copy the producer binary next to the consumer binary after each consumer build. Skips silently when either target is missing; requesting the same pair twice aborts configure. Call it after BuildApplications, normally from a Finalize Pre hook; the Applications stage already owns the <DEV>_BakerLib copies. |
cmake.helper.CopyRuntimeToTarget |
CopyRuntimeToTarget(<target> <runtime-file>) |
function |
- | BuildTools/cmake/helpers/Build.cmake | Copy an existing runtime file next to the target binary after each target build. Skips silently when the path is empty, the file is absent at configure time, or the target is missing. Call it after BuildApplications, normally from a Finalize Pre hook. |
cmake.helper.TemporaryCompat |
TemporaryCompat(<id> "YYYY-MM-DD") |
function |
- | BuildTools/cmake/helpers/Commands.cmake | Mark temporary build refusals or platform restrictions with the shared compatibility removal date; expiry is checked by temporary_compat.py, including inactive branches. |