diff --git a/litr-ffmpeg/src/main/cpp/CMakeLists.txt b/litr-ffmpeg/src/main/cpp/CMakeLists.txt index d3948c14..9ad4162f 100644 --- a/litr-ffmpeg/src/main/cpp/CMakeLists.txt +++ b/litr-ffmpeg/src/main/cpp/CMakeLists.txt @@ -84,3 +84,5 @@ target_link_libraries(litr-muxers PRIVATE avformat PRIVATE ${log-lib}) +#[[To support compiling 16 KB-aligned shared libraries with Android NDK version r26 or lower]] +target_link_options(litr-muxers PRIVATE "-Wl,-z,max-page-size=16384") diff --git a/litr/src/main/cpp/CMakeLists.txt b/litr/src/main/cpp/CMakeLists.txt index bf9d5088..6971c275 100644 --- a/litr/src/main/cpp/CMakeLists.txt +++ b/litr/src/main/cpp/CMakeLists.txt @@ -11,4 +11,9 @@ find_library(log-lib log) target_link_libraries(litr-jni ${log-lib} - oboe-resampler) \ No newline at end of file + oboe-resampler) + +#[[To support compiling 16 KB-aligned shared libraries with Android NDK version r26 or lower]] +set_target_properties(litr-jni PROPERTIES + LINK_FLAGS "-Wl,-z,max-page-size=16384" +)