You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologize for this very basic question, but I'm stuck and cannot find good documentation for solving my problem. Therefore I ask it here, maybe this is of interest for other developers too.
I have a (quite large) project with CMake. I use conan of course, and typically I run conan export (for local recipes) and conan install from inside CMakeLists.txt. To simplify that let's say I run conan install before running CMake here:
After that, building works an everything is fine for the Linux host platform. This is my happy path.
Now, I want to use the same project for Android. I use the old android_ndk_installer first because this is my current setup, but I want to change to the newer version when I've solved this one. Anyway it's included in the examples too (using the new build/host profile setup).
What I don't understand: all information for the NDK (ANDROID_ABI and CMAKE_TOOLCHAIN_FILE) is known by the android_ndk_installer, and I want to use this information. But how? I think I have to run now this commands, where I add the values for both settings to the CMake command line:
Hi all,
I apologize for this very basic question, but I'm stuck and cannot find good documentation for solving my problem. Therefore I ask it here, maybe this is of interest for other developers too.
A sample project is here: hello-world.zip
I have a (quite large) project with CMake. I use conan of course, and typically I run
conan export
(for local recipes) andconan install
from inside CMakeLists.txt. To simplify that let's say I runconan install
before running CMake here:conan install . -if build/linux-old -b missing -pr linux_profile
Then I run cmake, in
CMakeLists.txt
I use the typical Conan includes and functions:After that, building works an everything is fine for the Linux host platform. This is my happy path.
Now, I want to use the same project for Android. I use the old
android_ndk_installer
first because this is my current setup, but I want to change to the newer version when I've solved this one. Anyway it's included in the examples too (using the new build/host profile setup).What I don't understand: all information for the NDK (
ANDROID_ABI
andCMAKE_TOOLCHAIN_FILE
) is known by theandroid_ndk_installer
, and I want to use this information. But how? I think I have to run now this commands, where I add the values for both settings to the CMake command line:conan install . -if build/android-old -b missing -pr android_profile cmake -B build/android-old \ -D ANDROID_ABI=arm64-v8a \ -D CMAKE_TOOLCHAIN_FILE=/home/zoufala/.conan/data/android_ndk_installer/r20/bincrafters/stable/package/84fc5086d5b84ea42507b9623275f83e74452fe1/build/cmake/android.toolchain.cmake
At least, it is what I do currently, with this hard-coded settings.
As you can see, I have to know the values for
ANDROID_ABI
andCMAKE_TOOLCHAIN_FILE
here, but how to get it fromandroid_ndk_installer
?I cannot change the project setup too much, because it is big and has many other constraints. But I hope there is a simple solution for this?
Is there a more detailed documentation you can recommend to me? https://docs.conan.io/en/latest/integrations/cross_platform/android.html doesn't explain much, just
In case of using CMake, it will inject the appropriate toolchain file and set up the necessary CMake variables
.Many thanks in advance!
The text was updated successfully, but these errors were encountered: