API Reference
The GP Build Tool public API is entirely CMake macros with the gp prefix. Each macro is a thin wrapper that delegates to an internal gpbt_ function, so internal behaviour can change without breaking project code.
Including the build tool
Every CMakeLists.txt that uses the API must include the build tool module:
include(gp-build-tool)
The module uses include_guard(GLOBAL), so including it multiple times across the source tree is safe. Subsequent includes are no-ops.
API surface
The public API is grouped by function. Each group is documented on its own page.
| Group | What it covers |
|---|---|
| Build Tool Lifecycle | gpStartBuildTool, gpEndBuildTool, gpApplyGraphicalPlaygroundDefaultPolicy |
| Scanning | gpBuildToolAutoScan |
| Targets | gpStartModule, gpStartExecutable, gpStartPlugin, gpEndTarget |
| Sources | gpAddSourceFile, gpAddSourceDirectory, gpExcludeSourceFile, and more |
| Dependencies | gpAddDependency with PUBLIC, PRIVATE, INTERNAL, and DYNAMIC visibility |
| Include Directories | Automatic include path management from the directory layout |
| Compile Definitions | gpAddCompileDefinition |
| Compile Options | gpAddCompileOption |
| Link Options | gpAddLinkOption |
| Miscellaneous Options | gpSetHeaderOnly, gpDisableStrictWarnings, gpSetStatic, gpAddPrecompiledHeader, and more |
| Executable Specific | gpSetGuiExecutable, gpSetEntryPoint, gpAddResourceFile |
| IDE Integration | gpSetFolder, gpAddAlias |
Naming conventions
| Pattern | Meaning |
|---|---|
gp<PascalCase>() | Public macro, safe to call from project code |
gpbt_<camelCase>() | Internal function, do not call directly |
GPBT_<UPPER_SNAKE> | Build tool cache variable or global flag |
gp::<name> | CMake alias for a GP module target |
gp::thirdparty::<name> | CMake alias for a resolved thirdparty package |
warning
Do not call gpbt_* functions directly from project code. They are internal to the build tool and their signatures can change between versions without notice.