You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/scripts/build/Platform
lumberyard-employee-dm f09055af42
Fixed CMake use with Android NDK 23 (#6460)
* Fixed CMake use with Android NDK 23

This was done by only setting the `ANDROID_ARM_MODE` if the ANDROID_ABI
starts with `armeabi`.

The Android arm mode setting can't be used using non-`armeabi` ABIs.
In O3DE we default to `arm64-v8a` `ANDROID_ABI`
So `ANDROID_ARM_MODE` must not be set.

The CMake [Android-Determine.cmake](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/Platform/Android-Determine.cmake#L573-585) which is used to detect platform-wide information when the CMAKE_SYSTEM_NAME is set to android, enforces that if the `CMAKE_ANDROID_ARCH_ABI` doesn't start with `armeabi`, then it will fatal error if the CMAKE_ANDROID_ARM_MODE option is set.

In Android NDK 21 the `ANDROID_ARM_MODE` variable is used to set the CMAKE_ANDROID_ARM_MODE variable if the [ANDROID_ABI](https://android.googlesource.com/platform/ndk/+/refs/tags/ndk-r21e/build/cmake/android.toolchain.cmake#700) starts with `armeabi`.

This meant when using Android NDK 21, the CMake Android-Determine.cmake module would succeed, due
to the CMAKE_ANDROID_ARM_MODE not being set.

In Android NDK 23 the `ANDROID_ARM_MODE` now will set the
`CMAKE_ANDROID_ARM_MODE` variable to `TRUE` if it isn't defined.

Added an `--extra-cmake-configure-args` option to the `generate_android_project.py` script which can be used to append user specified CMake arguments to the cmake configure step (`cmake -B <build-dir> -S <source-dir> -DCMAKE_TOOLCHAIN_FILE=<android-toolchain-file> <extra-args>`)

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the O3DE Android toolchain wrapper to fatal error if the 64-bit
arm ABI isn't used.

Also removed the unneccessary setting of the ANDROID_ARM_MODE and
ANDROID_ARM_NEON option option now that the armeabi cannot be specified
as an ABI.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
..
Android Fixed CMake use with Android NDK 23 (#6460) 4 years ago
Linux Some fixes for paths with spaces (#6757) 4 years ago
Mac Some fixes for paths with spaces (#6757) 4 years ago
Windows Some fixes for paths with spaces (#6757) 4 years ago
iOS More packaging cleanup (#6728) 4 years ago