Create a functional CMake project using androidbuild.sh

This commit is contained in:
Anonymous Maarten committed 2024-06-18 00:11:44 +02:00
1 parent 8ab1ffca8a
commit 1a68d846de
4 files changed
+31 -10

No files matched your search

+9 -5
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'
}
}
}