For anyone building CMake-based extensions (e.g. to bundle a 3rd party lib which uses CMake), check out my GDExtensionTemplate.
It uses godot-cpp and sets up a bunch of stuff for you so you can get started on your own code:
- godot-cpp included as git sub-module for easy updating
- generates a version header file for easy conditional compilation
- uses ccache if available for faster rebuilds
- builds universal library (x86_64 and arm64) on macOS
- includes clang-formatting for clean, consistent code style
- includes GitHub workflows (CI) for:
- building the extension on Linux x86_64 (gcc), macOS universal (clang), and Windows x86_64 (MSVC)
- generating debug & release packages on each commit
- using
ccache
to improve CI build times when available - checking code formatting using
clang-format
Special thanks to contributors - of both code and coffee!