Files
TTSTDConnect/android_receiver/app/src/main/cpp/CMakeLists.txt
T
tongtong b89a65993c fix(android): 修复投屏崩溃与 16 KB 页兼容
- 采集会话迁移到 MediaProjectionService 前台服务
- 修正 libopus JNI 符号名,加载失败时回退 MediaCodec
- .so 按 16 KB 页对齐,兼容 Android 15+ 设备
- 签名配置外置到 config.gradle(已忽略,不再入库)
- 心跳与传输改到后台线程,补充 Gradle wrapper
2026-11-26 21:22:53 +08:00

21 lines
732 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
cmake_minimum_required(VERSION 3.22.1)
project(ttstd_opus)
add_library(ttstd_opus SHARED opus_jni.cpp)
find_library(log-lib log)
target_link_libraries(ttstd_opus ${log-lib})
# Android 15+ 的 16 KB 页设备要求 .so 的 LOAD 段按 16 KB 对齐。
# NDK r27 默认仍是 4 KB,NDK r28+ 才默认 16 KB,因此这里显式指定,
# 避免安装时报 "not compatible with 16 KB devices"。
target_link_options(ttstd_opus PRIVATE
-Wl,-z,max-page-size=16384
-Wl,-z,common-page-size=16384
)
# TODO(libopus): 将 opus 源码加入后,取消下面注释并启用 native 编码:
# add_subdirectory(opus)
# target_link_libraries(ttstd_opus opus)
# 同时把 opus_jni.cpp 中的 OPUS_NATIVE_AVAILABLE 改为 1。