flutter-tsnet/linux/CMakeLists.txt
Mathias Beaulieu-Duncan f070bcdb86 Add Android and Linux platform support (local gRPC working, tsnet WIP)
- Android: Dart FFI → Go c-shared (.so) in jniLibs (arm64-v8a + x86_64)
- Linux: Dart FFI → Go c-shared (.so) via Docker cross-compilation (amd64)
- Dart API: TsnetFlutter uses MethodChannel on iOS/macOS, FFI on Android/Linux
- Add ffi package dependency for native function bindings
- Build script: ./build_go.sh [ios|macos|android|linux|apple|all]
- Android RegisterInterfaceGetter to bypass netlink CAP_NET_ADMIN restriction
- Make TailscaleStart() idempotent and add GODEBUG=netdns=go for Android

Known: Android tsnet tunnel blocked by Go stdlib net.Interfaces() netlink
call — local gRPC works, Tailscale fallback needs libtailscale integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 07:49:11 -04:00

9 lines
347 B
CMake

cmake_minimum_required(VERSION 3.10)
project(tsnet_flutter_library VERSION 0.2.0 LANGUAGES C)
# Bundle the pre-built Go shared library with the Flutter app.
# The .so is built by build_go.sh and placed in this directory.
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/libtailscale.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
COMPONENT Runtime)