taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 438 forks source link

android cmake: ignore symlinks to match toolchain machine name #100

Open aleksander0m opened 7 years ago

aleksander0m commented 7 years ago

If the NDK contains more than one file suffixed with -gcc, it will fail to detect the toolchain machine name, as the logic expects only one result.

Just ignore the any symlink we may have when listing the -gcc suffixed files.:

ls -l /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/*-gcc /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc /opt/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-gcc -> arm-linux-androideabi-gcc

ao2 commented 3 years ago

This would be a very welcome addition, and would save people some time. I came up with something similar when trying to build a project with ANDROID_API_LEVEL=21 and only found this PR later on when trying to report the issue.

Thanks anyway @aleksander0m