mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 12:28:10 +03:00
Android: Update build instructions
Require CMake 3.20+, because after upgrading the Android Gradle plugin build with CMake <3.20 fails with the following error: Execution failed for task ':app:buildCMakeDebug'. > Expected output file at (...)obj/armeabi-v7a/libSDL2.so for target SDL2 but there was none
This commit is contained in:
+6
-5
@@ -5,7 +5,7 @@ Prebuilt APKs are [here](https://github.com/kichikuou/system3-sdl2/releases).
|
||||
|
||||
## Build
|
||||
Prerequisites:
|
||||
- CMake >=3.13
|
||||
- CMake >=3.20
|
||||
- Android SDK >=28
|
||||
- Android NDK >=r15c
|
||||
|
||||
@@ -20,16 +20,17 @@ Then open `system3-sdl2/android` directory as an Android Studio project.
|
||||
### Command line build
|
||||
Configure environment variables and run the `gradlew` script in this folder.
|
||||
|
||||
Example build instructions (for Debian buster):
|
||||
Example build instructions (for Debian bullseye):
|
||||
```sh
|
||||
# Install necessary packages
|
||||
sudo apt install git wget unzip default-jdk-headless cmake ninja-build
|
||||
sudo apt install git wget unzip default-jdk-headless ninja-build
|
||||
sudo apt install -t bullseye-backports cmake
|
||||
|
||||
# Install Android SDK / NDK
|
||||
export ANDROID_SDK_ROOT=$HOME/android-sdk
|
||||
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip
|
||||
unzip commandlinetools-linux-7302050_latest.zip -d $ANDROID_SDK_ROOT/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
||||
unzip commandlinetools-linux-7583922_latest.zip -d $ANDROID_SDK_ROOT/cmdline-tools
|
||||
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/tools
|
||||
yes |$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager ndk-bundle
|
||||
|
||||
@@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(GAME)
|
||||
|
||||
# armeabi-v7a requires cpufeatures library
|
||||
# include(AndroidNdkModules)
|
||||
# android_ndk_import_module_cpufeatures()
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SDL
|
||||
|
||||
Reference in New Issue
Block a user