cmake_minimum_required(VERSION 3.22.1)
project(meshport_android)
add_library(meshport_ffi SHARED IMPORTED)
set_target_properties(meshport_ffi PROPERTIES
    IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libmeshport_ffi.so"
    IMPORTED_NO_SONAME TRUE)
add_library(meshport_proxy SHARED IMPORTED)
set_target_properties(meshport_proxy PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libmeshport_proxy.so" IMPORTED_NO_SONAME TRUE)
add_library(meshport_android SHARED bridge.cpp)
target_link_libraries(meshport_android meshport_ffi meshport_proxy)
target_link_options(meshport_android PRIVATE "-Wl,-z,max-page-size=16384")
