All Projects → lethiandev → godot-cpp-cmake

lethiandev / godot-cpp-cmake

Licence: MIT license
CMake scripts to build cross-platform GDNative C++ bindings

Programming Languages

CMake
9771 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to godot-cpp-cmake

GDGotm
Official Godot plugin for gotm.io - the Godot Platform!
Stars: ✭ 43 (+115%)
Mutual labels:  godotengine, godot, godot-engine
godot-android-plugin-firebase
Godot 3.2.2 Android plugin for Firebase
Stars: ✭ 41 (+105%)
Mutual labels:  godotengine, godot, godot-engine
godot-gameshell
Godot export templates and instructions for the GameShell portable game console and other single-board computers
Stars: ✭ 34 (+70%)
Mutual labels:  godotengine, godot, godot-engine
Game-Examples
Godot game examples for gotm.io - the Godot Platform!
Stars: ✭ 27 (+35%)
Mutual labels:  godotengine, godot, godot-engine
godot-cmvalley
Port of the Sauerbraten clanmap cm|Valley to Godot 4.0
Stars: ✭ 28 (+40%)
Mutual labels:  godotengine, godot, godot-engine
MySQL Module
MySQL connector to Godot Engine.
Stars: ✭ 30 (+50%)
Mutual labels:  godotengine, godot, godot-engine
godot-practice-shaders
Some practice shaders in Godot
Stars: ✭ 79 (+295%)
Mutual labels:  godotengine, godot, godot-engine
Logic-Circuit-Simulator
A free and open-source Logic Circuit Simulator built in Godot Engine.
Stars: ✭ 23 (+15%)
Mutual labels:  godotengine, godot, godot-engine
Pixelorama
A free & open-source 2D sprite editor, made with the Godot Engine! Available on Windows, Linux, macOS and the Web!
Stars: ✭ 2,535 (+12575%)
Mutual labels:  godotengine, godot, godot-engine
godot-performance-comparison
Godot performance comparison between the `3.x` and `master` branch
Stars: ✭ 12 (-40%)
Mutual labels:  godotengine, godot, godot-engine
discord.gd
Discord Bot API wrapper for Godot. Make bots in GDScript.
Stars: ✭ 69 (+245%)
Mutual labels:  godotengine, godot, godot-engine
Godot-DialogPlugin
🗨️ A Dialog Node for Godot Engine
Stars: ✭ 194 (+870%)
Mutual labels:  godotengine, godot, godot-engine
OpMon-Godot
An open source Pokemon-inspired game, now with Godot
Stars: ✭ 50 (+150%)
Mutual labels:  godotengine, godot, godot-engine
novemberdev soulslike darksouls godot
Dark Souls clone in 3D with Godot
Stars: ✭ 51 (+155%)
Mutual labels:  godotengine, godot, godot-engine
godot-lod-demo
Demonstration project for the Level of Detail (LOD) Godot 3.x add-on
Stars: ✭ 34 (+70%)
Mutual labels:  godotengine, godot, godot-engine
DartGodot
Godot + Dart 🎯
Stars: ✭ 79 (+295%)
Mutual labels:  godotengine, godot, godot-engine
autotiler
Autotile 47-tile blob tileset generator application with Godot export support. Based on Electron JS.
Stars: ✭ 32 (+60%)
Mutual labels:  godotengine, godot, godot-engine
Godot-3.0-Noise-Shaders
Godot 3.0 Noise Shaders
Stars: ✭ 38 (+90%)
Mutual labels:  godotengine, godot, godot-engine
godot-interpolated-camera3d
Provides an InterpolatedCamera3D node that replicates its 3.2.x functionality (and more)
Stars: ✭ 40 (+100%)
Mutual labels:  godotengine, godot, godot-engine
godot-local-notification
Godot module for local notifications (android and iOS)
Stars: ✭ 111 (+455%)
Mutual labels:  godotengine, godot, godot-engine

CMake Build Scripts for GDNative C++ Bindings

This repo contains CMake scripts to ease cross-platform building of GDNative C++ bindings.

Supported platforms:

  • Windows & Linux
  • Android (Android NDK)
  • WebAssembly (Emscripten)

Requires at least Godot Engine 3.1 with support for NativeScript 1.1, but may work with older Godot Engine releases.

Clone this repo with --recurse-submodules option. It'll clone this repo with all required dependencies such as godot-cpp and godot_headers direct from github's repository.

Prerequisites

Before start building, you need CMake 3.10+ build scripts generator, Python for GDNative C++ bindings' generator and Android SDK with NDK bundle installed. Optionally, you can use Ninja build system - my personal choice - but these CMake scripts should work with any build system supported by your environment.

Compiling

It's advisable to create separate subdirectories for each target platforms inside /build directory. For example, for Windows x64 build, name the subdirectory as win64 and open it within Command Prompt (or Terminal, depends on your OS). For MSVC build, use MSVC's Native Command Prompt (x86 or x64). After the preparation, generate build scripts being inside the platform build directory using CMake as:

cd build\win64
cmake -G Ninja ..\.. -DGODOT_API_JSON=C:\Path\To\godot_api.json

This should work with Linux the same way. But for Android, it isn't more complicated. Bur first, you should ensure that you're having the latest NDK (tested on r19) version installed on your system with CMake toolchain file bundled. Assuming you have configured Android SDK properly, you can run the CMake tool with specified definitions:

cd build\android
cmake -G Ninja ..\.. -DCMAKE_SYSTEM_NAME=Android -DGODOT_API_JSON=C:\Path\To\godot_api.json

For Android build, CMake's script tries to find Android NDK's CMake Toolchain automatically using ANDROID_NDK_ROOT environment variable. Ensure first, that it's available on your system. Also remember to use -DCMAKE_SYSTEM_NAME=Android flag, as it does Android build scripts preparation.

Experimental Emscripten build is also available, but GDNative on JavaScript platform is currently not officialy supported by Godot Engine developers. To generate build scripts for Emscripten, use -DCMAKE_SYSTEM_NAME=Emscripten flag. As like for Android target, CMake's script will try to find Emscripten's toolchain using EMSCRIPTEN environment variable.

If you wish, you can supply toolchain file manually by defining CMAKE_TOOLCHAIN_FILE variable yourself.

To generate build scripts for release (optimized) targets, use CMake's -DCMAKE_BUILD_TYPE option as -DCMAKE_BUILD_TYPE=Release. Built libraries should be located under /lib root directory. Emscripten have special MinSizeRel build type, as it builds the library in favour of minimizing the library size also the performance loss is minimal.

Troubleshooting

If you don't know how to obtain the godot_api.json file, just run Godot.exe within Command Prompt with --gdnative-generate-json-api option, just like:

Godot.exe --gdnative-generate-json-api godot_api.json

Generated godot_api.json file should be located inside the same directtory as Godot executable.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].