Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] How to inject ANDROID_ABI, and use the NDK and toolchain file provided by Android? #7484

Closed
1 task done
kheaactua opened this issue Aug 3, 2020 · 1 comment · Fixed by #8749
Closed
1 task done
Milestone

Comments

@kheaactua
Copy link

I see that in !4538, cmake_flags.py was augmented to set the ANDROID_ABI definition in CMake. But code only applies this if a toolchain file is not provided.

My problem is that I'm using the CMake toolchain file provided in the NDK (and using a per-existing NDK), however it requires ANDROID_ABI to be set externally (before it). Thus, I have no way to supply ANDROID_ABI to the toolchain file, and then it just assumed armv7.

Is there a different way to inject ANDROID_ABI? Or cancmake_flags.py be modified to set the ANDROID_ABI definition before checking if there's a toolchain file? Because the one from the NDK - if given ANDROID_ABI does a lot of the heavy lifting. I could drop using the NDK supplied toolchain file in favour of relying on conan to get the values right, but (no criticism of conan here) it feels like depending on Android for the NDK toolchain file is more sustainable.

@memsharded
Copy link
Member

In #8749, merged and ready for Conan 1.36, the integration will define the path of the NDK and the CMake toolchain from it will be automatically used. Variables like ANDROID_ABI will be defined by the conan_toolchain.cmake that defines these variables, then includes the Android NDK Cmake toolchain. The CMakeToolchain Android block will have the configurability to control these variables too.

So I think this issue can be considered solved by that PR. Keep tuned for the release and the documentation, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants