asmaloney / GDExtensionTemplate

📜 A template project for building Godot 4 GDExtensions using CMake
The Unlicense
229 stars 22 forks source link

Android or iOS? #3

Open asmaloney opened 1 year ago

asmaloney commented 1 year ago

I'm sure there's a way to build for Android & iOS, but I've never worked with either of them so I don't know what's required.

If anyone is keen on those, please feel free to file a PR!

scgm0 commented 1 year ago

For my Android build, just add "-DCMAKE_SYSTEM_NAME=Android" to the command line (cmake >= 3.21: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-the-ndk)

scgm0 commented 1 year ago

cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=install JavaScriptApi -DCMAKE_SYSTEM_NAME=Android