Skip to content

Commit

Permalink
Fix build errors for Android builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kairusds authored and vigneshvg committed Oct 14, 2024
1 parent eb02b2e commit fb2dceb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android_jni/avifandroidjni/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {

android {
namespace 'org.aomedia.avif.android'
compileSdk 30
compileSdk 31
ndkVersion "25.2.9519653"

defaultConfig {
minSdk 21
targetSdk 30
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
5 changes: 3 additions & 2 deletions android_jni/avifandroidjni/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ add_library("avif_android" SHARED "libavif_jni.cc")

# Import the cpu-features module to compute the number of threads used for
# decoding.
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
set(CPU_FEATURES_DIR "${ANDROID_NDK}/sources/android/cpufeatures")
include_directories(${CPU_FEATURES_DIR})
add_library(cpufeatures STATIC "${CPU_FEATURES_DIR}/cpu-features.c")

target_link_libraries(avif_android jnigraphics avif log cpufeatures)

0 comments on commit fb2dceb

Please sign in to comment.