Last active
March 6, 2021 14:17
-
-
Save jemsz95/80d4c0de6918989e9b1f503480efa871 to your computer and use it in GitHub Desktop.
GDNative Mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.10) | |
set(CMAKE_BUILD_TYPE Debug) | |
set(LIB_TYPE "SHARED" CACHE STRING "SHARED|STATIC") | |
project(minmax VERSION 0.1.0) | |
add_library(minmax ${LIB_TYPE} | |
src/gdnative.c | |
src/minmax.c | |
src/nodelist.c | |
) | |
target_include_directories(minmax PRIVATE include ../godot_headers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if not defined ANDROID_NDK_HOME ( | |
echo "ANDROID_NDK_HOME is unset" | |
GOTO:EOF | |
) | |
for %%a in (armeabi-v7a arm64-v8a x86 x86_64) do ( | |
md build\android-%%a | |
cd build\android-%%a | |
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=%ANDROID_NDK_HOME%\prebuilt\windows-x86_64\bin\make.exe -DANDROID_PLATFORM=21 -DANDROID_ABI=%%a -DLIB_TYPE=SHARED -Wno-dev ..\.. | |
%ANDROID_NDK_HOME%\prebuilt\windows-x86_64\bin\make.exe | |
cd ..\.. | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ -z ${CMAKE_ANDROID_TOOLCHAIN+x} ]; then | |
echo "CMAKE_ANDROID_TOOLCHAIN is unset" | |
exit 1 | |
fi | |
TARGETS=( armeabi-v7a arm64-v8a x86 x86_64 ) | |
for abi in "${TARGETS[@]}"; do | |
mkdir -p build/android-$abi | |
cd build/android-$abi | |
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_ANDROID_TOOLCHAIN -DANDROID_PLATFORM=21 -DANDROID_ABI=$abi -DLIB_TYPE:STRING=SHARED -Wno-dev ../.. | |
make | |
cd ../.. | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
if [ -z ${CMAKE_IOS_TOOLCHAIN+x} ]; then | |
echo "CMAKE_IOS_TOOLCHAIN is unset" | |
exit 1 | |
fi | |
mkdir -p build/ios | |
cd build/ios | |
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_IOS_TOOLCHAIN -DLIB_TYPE:STRING=STATIC ../.. | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment