File tree Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
22
3+ def usingCMakeCompile () {
4+ // / define gradle.ext.usingCMakeCompile = false to disable CMakeCompile Mode.
5+ return gradle. ext != null && gradle. ext. has(" usingCMakeCompile" ) && gradle. ext. usingCMakeCompile;
6+ }
7+
8+ def usingCMakeCompileDebug () {
9+ // / define gradle.ext.usingCMakeCompileDebug = true to enable CMake Debug Mode.
10+ return gradle. ext != null && gradle. ext. has(" usingCMakeCompileDebug" ) && gradle. ext. usingCMakeCompileDebug;
11+ }
12+
313android {
414 compileSdkVersion rootProject. ext. android. compileSdkVersion
515 buildToolsVersion rootProject. ext. android. buildToolsVersion
616
17+ if (usingCMakeCompile()) {
18+ ndkVersion " 23.1.7779620"
19+ }
20+
721 defaultConfig {
822 applicationId rootProject. ext. android. applicationId
923 minSdkVersion rootProject. ext. android. minSdkVersion
Original file line number Diff line number Diff line change 1- # Wed Jan 04 11:21:04 CST 2023
1+ # Thu Jan 05 14:44:46 CST 2023
22distributionBase =GRADLE_USER_HOME
33distributionUrl =https\://services.gradle.org/distributions/gradle-7.6-bin.zip
44distributionPath =wrapper/dists
Original file line number Diff line number Diff line change @@ -45,10 +45,8 @@ android {
4545 " -DANDROID_GRADLE=ON" ,
4646 cmakeBuildType
4747
48- cFlags " -mfloat-abi=softfp -mfpu=vfp -Os -ffast-math -fPIC -DNO_LOCALE_SUPPORT -DANDROID_NDK"
49- cppFlags " -frtti -std=c++14 -fPIE -fPIC -fno-exceptions -fvisibility-inlines-hidden -DNO_LOCALE_SUPPORT -DANDROID_NDK ${ cppExtraFlags} "
50-
51-
48+ cFlags " -ffast-math -fPIE -fPIC -DNO_LOCALE_SUPPORT=1 -DANDROID_NDK=1 -D__STDC_CONSTANT_MACROS=1 ${ cppExtraFlags} "
49+ cppFlags " -ffast-math -fPIE -fPIC -DNO_LOCALE_SUPPORT=1 -DANDROID_NDK=1 -D__STDC_CONSTANT_MACROS=1 -frtti -std=c++14 -fno-exceptions -fvisibility-inlines-hidden ${ cppExtraFlags} "
5250
5351 println (" cmake arguments: " + arguments)
5452 println (" cppFlags: " + cppFlags)
@@ -83,10 +81,10 @@ android {
8381 // //////////////////////////////////////
8482
8583 sourceSets. main {
86- if (! usingCMakeCompile()) {
87- jniLibs. srcDir ' src/main/libs' // set libs as .so's location instead of jni
88- jni. srcDirs = [] // disable automatic ndk-build call with auto-generated Android.mk file
89- }
84+ if (! usingCMakeCompile()) {
85+ jniLibs. srcDir ' src/main/libs' // set libs as .so's location instead of jni
86+ jni. srcDirs = [] // disable automatic ndk-build call with auto-generated Android.mk file
87+ }
9088 }
9189 compileOptions {
9290 sourceCompatibility JavaVersion . VERSION_1_8
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ include_directories(
6363 ${CMAKE_CURRENT_SOURCE_DIR} /custom
6464 ${CMAKE_CURRENT_SOURCE_DIR} /ffmpeg)
6565
66- add_definitions (-DANDROID_NDK -DCGE_LOG_TAG=\"libCGE\" -DCGE_TEXTURE_PREMULTIPLIED=1 -D_CGE_USE_FFMPEG_ -D__STDC_CONSTANT_MACROS - D_CGE_DISABLE_GLOBALCONTEXT_ -O3 -D_CGE_ONLY_FILTERS_=1 -D__STDC_CONSTANT_MACROS =1)
66+ add_definitions (-DANDROID_NDK -DCGE_LOG_TAG=\"libCGE\" -DCGE_TEXTURE_PREMULTIPLIED=1 -D_CGE_USE_FFMPEG_ -D_CGE_DISABLE_GLOBALCONTEXT_ -O3 -D_CGE_ONLY_FILTERS_=1)
6767
6868if (CGE_USE_VIDEO_MODULE)
6969
You can’t perform that action at this time.
0 commit comments