Skip to content

Repository files navigation

godot-cpp for build2

This is the build2 package for godot-cpp.

godot-cpp is the library C++ users must use to make GDExtensions for the Godot Engine, allowing using C++ for part or all the behavior of a game made with Godot.

Requirements

This package requires the presence of python >= 3.4 in the environment (#1), used to run a code generator script before building the library.

Importable Targets

  • godot-cpp%liba{godot-cpp} :

    The godot-cpp library (exclusively static). Make your GDExtension shared library depend on this target for it's code to have acces to the C and C++ APIs (as specified by GDExtension documentation). Communication with Godot goes through the C API internally so there is no ABI, you can build however you want. Beware that on Windows C runtime implementation being different in "debug" and "release" configurations.

Usage

Compatibility with Godot Engine

The version of godot-cpp to chose depends directly on which version of the Godot Engine executable (both editor and game) you use:

If you want to use a custom build of the Godot Engine: TODO: we currently don't support directly this scenario but it is planned.

Configuration Options

  • config.godot_cpp.target_godot_version (no default value): Version of Godot that will be targeted as lowest version supported by the GDextension this library will be used to build. The version must be expressed as X.Y as only the minor version is important, for example:

    bdep init [...] config.godot_cpp.target_godot_version=4.3
    

    The minimum supported version is 4.3. See godot-cpp's documentation for details.

  • config.godot_cpp.enable_hot_reload (default: true) : Enables hot-reloading when using the Godot Engine Editor starting with versions 4.2. If true, you must also set reloadable = true in the .gdextension file going with your GDExtension to enable the feature. When the GDExtension binary file is changed, the editor will attempt to hot-reload it the next time it's windows acquires focus. This behavior will fail if your GDExtension was not built with this option and there will be no attempt if reloadable = true was not set in the .gdextension file.

TODO: The other options are not supported yet, see #7

About

build2 package for Godot's GDExtension library

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages