Build libass for Android.
git clone --recurse-submodules https://github.com/peerless2012/libass-cmake.git ./src/main/cpp
cd ./src/unibreak && ./autogen.sh
cd ./src/fribidi && ./autogen.sh
cd ./src/ass && ./autogen.sh
cmake_minimum_required(VERSION 3.22.1)
# add ass cmake folder
add_subdirectory(libass-cmake)
project("libass")
include_directories(${CMAKE_BINARY_DIR}/include)
add_library(${CMAKE_PROJECT_NAME} SHARED native-lib.c)
# add target dependence
add_dependencies(${CMAKE_PROJECT_NAME} ep_ass)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_BINARY_DIR}/include)
target_link_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_BINARY_DIR}/lib)
# add .a lib to project
target_link_libraries(${CMAKE_PROJECT_NAME}
"-Wl,--whole-archive" ass fribidi freetyped harfbuzz unibreak png "-Wl,--no-whole-archive"
android
z
log)