Created
September 8, 2016 07:27
-
-
Save Nathaniel100/41c1ae23bc1a584c87a47690645decd9 to your computer and use it in GitHub Desktop.
Building C++ in Android Studio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
externalNativeBuild{ | |
cmake{ | |
path "CMakeLists.txt" | |
} | |
} | |
defaultConfig { | |
externalNativeBuild { | |
cmake { | |
targets "target1", "target2" | |
arguments "-DANDROID_TOOLCHAIN=clang" | |
cFlags "-DTEST_C_FLAG1", "-DTEST_C_FLAG2" | |
cppFlags "-DTEST_CPP_FLAG2", "-DTEST_CPP_FLAG2" | |
abiFilters "armeabi-v7a", "armeabi" | |
} | |
} | |
} | |
or | |
externalNativeBuild{ | |
ndkBuild{ | |
path "Android.mk" | |
} | |
} | |
defaultConfig { | |
externalNativeBuild { | |
ndkBuild { | |
targets "target1", "target2" | |
arguments "NDK_APPLICATION_MK:=Application.mk" | |
cFlags "-DTEST_C_FLAG1", "-DTEST_C_FLAG2" | |
cppFlags "-DTEST_CPP_FLAG2", "-DTEST_CPP_FLAG2" | |
abiFilters "armeabi-v7a", "armeabi" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment