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
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
..
build Fixed CMake use with Android NDK 23 (#6460) 4 years ago
bundler supporting multiple directories 4 years ago
commit_validation Add CRC validator (#5857) 4 years ago
ctest Enabling mac tests (#6716) 4 years ago
detect_file_changes Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
license_scanner Update to licenses/notices script (#5214) 4 years ago
migration Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
o3de Fix project properties test 4 years ago
scrubbing Make scrubber/validator not depend on legacy packaging scripts (#6053) 4 years ago
signer/Platform Add platform specific codesign script and modifications for Linux and Windows installer packaging (#5893) 4 years ago
util Remove unused scripts/build/package (#5885) 4 years ago
CMakeLists.txt PR comments/improvements 4 years ago
o3de.bat Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
o3de.py Merging from development 4 years ago
o3de.sh Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago