If I have a build.gradle for an application:
android {
compileSdkVersion 24
buildToolsVersion \"25.0.2\"
defaultConfig {
applicationId \"
Do you have to add this to build.gradle
specifically? If not, add the following to one of your CMakeLists.txt
files:
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
Then you can target_link_libraries(<your target>, cpufeatures)
.
That macro and a couple of others are defined in $ANDROID_SDK/cmake/<cmake-version>/share/cmake-<version>/Modules/AndroidNdkModules.cmake
.