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:
kichikuou
2021-12-22 14:59:48 +09:00
parent 70277c7c51
commit b7634e9366
2 changed files with 6 additions and 9 deletions
+6 -5
View File
@@ -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
-4
View File
@@ -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