https://github.com/zly-u/godot_gde_cmake_example
A CMake + CLion example project for developing Plugins for Godot.
https://github.com/zly-u/godot_gde_cmake_example
cmake cpp gdextension godot
Last synced: 7 months ago
JSON representation
A CMake + CLion example project for developing Plugins for Godot.
- Host: GitHub
- URL: https://github.com/zly-u/godot_gde_cmake_example
- Owner: Zly-u
- Created: 2025-01-20T13:16:59.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-20T13:37:27.000Z (9 months ago)
- Last Synced: 2025-01-20T14:29:06.902Z (9 months ago)
- Topics: cmake, cpp, gdextension, godot
- Language: CMake
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GDExtension C++ CMake Example
---Made this mainly for myself to be able to use it with CLion.
If you use CLion then doing a simple "Install" should work right away.
The setup already handles the godot-cpp fetching, so no need to worry about cloning it yourself.
---
# How it works
Upon `Install` CMake will build the library and generate `.gdextension` file for the plugin to work.
Then it will place the files into `./demo/bin/` in order to test it quickly.`.gdextension` is generated based on template contents in `plugin_template.gdextension.in` that are replaced by CMake's `configure_file` function.
Some of the Plugin configuration mainly happens through `CMakeLists` file via some of the defined variables in it:
* `PROJECT_NAME` - Renames `.gdextension` file to match the project name, also renames the DLLs and targets in the `plugin_template.gdextension.in` file.
* `GODOT_MIN_REQUIREMENT` - Minimal Godot version requirement that is inserted into `${PROJECT_NAME}.gdextension`.
* `ENTRY_POINT` - Entry point name of the DLL.
* `GDP_TEMPLATE_FILE` - name of the `.gdextension.in` template file.