Issue
I'm trying to consume this pre-packaged build of libgmp for Android: https://github.com/Rupan/gmp
My project is built using Android Studio. I can "build" the pre-package library without trouble.
However, the package has different gmp.h
header files depending on the platform (ie. arm64-v8a/gmp.h
, armeabi/gmp.h
, ...). My own native code is being built using CMake. I would like to include the appropriate directory using include_directories
so I can use the appropriate header file.
Is there a variable or conditional that I can use for this?
Solution
arm64-v8a
, armeabi
are values of CMAKE_ANDROID_ARCH_ABI variable. So you may use this variable when declare an include directory:
include_directories("<...>/${CMAKE_ANDROID_ARCH_ABI}")
Answered By - Tsyvarev