Create a functional CMake project using androidbuild.sh

This commit is contained in:
Anonymous Maarten
2024-06-17 23:46:08 +02:00
parent 8ab1ffca8a
commit 1a68d846de
4 changed files with 31 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
def buildWithCMake = project.hasProperty('BUILD_WITH_CMAKE');
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
def buildAsApplication = !buildAsLibrary
if (buildAsApplication) {
@@ -45,11 +46,14 @@ android {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
// ndkBuild {
// path 'jni/Android.mk'
// }
cmake {
path 'jni/CMakeLists.txt'
if (buildWithCMake) {
cmake {
path 'jni/CMakeLists.txt'
}
} else {
ndkBuild {
path 'jni/Android.mk'
}
}
}