ultimate-media-tracker/CMakeLists.txt
Tronax de353f0218
feat: add Android app and end-to-end encrypted library sync
Introduce the Kotlin/Compose Android companion app and extend the TMDB
proxy into a combo server that synchronizes the whole library as an
encrypted snapshot, with all three components (Go server, Android,
desktop) sharing one zero-knowledge crypto envelope and JSON schema.

- server: add PostgreSQL-backed /sync/library (GET/PUT) with optimistic
  concurrency (revision + 409 on conflict); sync stays disabled unless
  DATABASE_URL is set. Add docker-compose with Postgres.
- desktop: add libsodium CryptoEnvelope, LibrarySerializer and SyncClient;
  storage-mode and passphrase settings; a "Sync now" toolbar action with
  conflict resolution.
- android: Room-backed library with local/cloud storage modes, encrypted
  sync client, and settings UI. The proxy server (URL + token) can be
  configured as a TMDB proxy even in local-only mode.

Crypto is identical across platforms: Argon2id (libsodium crypto_pwhash,
INTERACTIVE) + XChaCha20-Poly1305 in a versioned "UMTS" envelope, so a
snapshot encrypted on one client decrypts on the other.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-21 00:35:54 +02:00

119 lines
3.2 KiB
CMake

cmake_minimum_required(VERSION 3.21)
project(UltimateMediaTracker
VERSION 1.0.0
DESCRIPTION "Track movies, series, mangas, books and games"
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets Network Sql Svg Concurrent)
# libsodium provides the cross-platform crypto primitives (Argon2id +
# XChaCha20-Poly1305) used for the end-to-end encrypted library sync. It is
# located via pkg-config (available on Linux and MSYS2/mingw for the Windows
# build), which matches the byte-for-byte envelope used by the Android client.
find_package(PkgConfig REQUIRED)
pkg_check_modules(SODIUM REQUIRED IMPORTED_TARGET libsodium)
qt_standard_project_setup()
set(SOURCES
src/main.cpp
src/core/Enums.h
src/core/MediaItem.h
src/core/MediaItem.cpp
src/core/Database.h
src/core/Database.cpp
src/core/Settings.h
src/core/Settings.cpp
src/providers/MetadataProvider.h
src/providers/MetadataProvider.cpp
src/providers/TmdbProvider.h
src/providers/TmdbProvider.cpp
src/providers/OpenLibraryProvider.h
src/providers/OpenLibraryProvider.cpp
src/providers/AniListProvider.h
src/providers/AniListProvider.cpp
src/providers/RawgProvider.h
src/providers/RawgProvider.cpp
src/providers/ProviderManager.h
src/providers/ProviderManager.cpp
src/providers/ProxyLogin.h
src/providers/ProxyLogin.cpp
src/providers/ImageCache.h
src/providers/ImageCache.cpp
src/ui/ThemeManager.h
src/ui/ThemeManager.cpp
src/ui/MainWindow.h
src/ui/MainWindow.cpp
src/ui/MediaCard.h
src/ui/MediaCard.cpp
src/ui/FlowLayout.h
src/ui/FlowLayout.cpp
src/ui/FilterPanel.h
src/ui/FilterPanel.cpp
src/ui/DetailDialog.h
src/ui/DetailDialog.cpp
src/ui/EditDialog.h
src/ui/EditDialog.cpp
src/ui/OnlineSearchDialog.h
src/ui/OnlineSearchDialog.cpp
src/ui/SettingsDialog.h
src/ui/SettingsDialog.cpp
src/ui/StarRating.h
src/ui/StarRating.cpp
src/sync/CryptoEnvelope.h
src/sync/CryptoEnvelope.cpp
src/sync/LibrarySerializer.h
src/sync/LibrarySerializer.cpp
src/sync/SyncClient.h
src/sync/SyncClient.cpp
resources/resources.qrc
)
# Embed a Windows .ico into the executable (shown in Explorer / taskbar).
if(WIN32)
list(APPEND SOURCES resources/win/app.rc)
endif()
# WIN32: no console window on Windows. MACOSX_BUNDLE: produce a .app on macOS.
qt_add_executable(umt WIN32 MACOSX_BUNDLE ${SOURCES})
target_include_directories(umt PRIVATE src)
target_link_libraries(umt PRIVATE
Qt6::Widgets
Qt6::Network
Qt6::Sql
Qt6::Svg
Qt6::Concurrent
PkgConfig::SODIUM
)
install(TARGETS umt
BUNDLE DESTINATION .
RUNTIME DESTINATION bin)
# Linux desktop integration: install a .desktop launcher and the app icon so it
# shows up in menus with a proper icon.
if(UNIX AND NOT APPLE)
install(FILES resources/linux/ultimate-media-tracker.desktop
DESTINATION share/applications)
install(FILES resources/icons/appicon.png
DESTINATION share/icons/hicolor/256x256/apps
RENAME ultimate-media-tracker.png)
endif()