mirror of
https://github.com/KDE/kasts.git
synced 2024-12-08 22:46:03 +01:00
f861f4e802
This implements the gpodder API from scratch. It turned out that libmygpo-qt has several critical bugs, and there's no response to pull requests upstream. So using that library was not an option. The implementation into kasts consists of the following: - Can sync with gpodder.net or with a nextcloud server that has the nextcloud-gpodder app installed. (This app is mostly API compatible with gpodder.) - Passwords are stored using qtkeychain. If the keychain is unavailable it will fallback to file. - It syncs podcast subscriptions and episode play positions, including marking episodes as played. Episodes that have a non-zero play position will be added to the queue automatically. - It will check for a metered connection before syncing. This is coupled to the allowMeteredFeedUpdates setting. - Full synchronization can be performed either manually (from the settings page) or through automatic triggers: on startup and/or on feed refresh. - There is an additional possibility to trigger quick upload-only syncs to make sure that the local changes are immediately uploaded to the server (if the connection allows). This will trigger when subscriptions are added or removed, when the pause/play button is toggled or an episode is marked as played. - This implements a few safeguards to avoid having multiple feed URLS pointing to the same underlying feed (e.g. http vs https). This solves part of #17 Solves #13
83 lines
2.6 KiB
CMake
83 lines
2.6 KiB
CMake
# SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
|
|
# SPDX-FileCopyrightText: 2020 Nicolas Fella <nicolas.fella@gmx.de>
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(Kasts)
|
|
set(PROJECT_VERSION "21.08")
|
|
|
|
# be c++17 compliant
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set(KF5_MIN_VERSION "5.86.0")
|
|
set(QT_MIN_VERSION "5.15.0")
|
|
|
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
include(FeatureSummary)
|
|
include(ECMSetupVersion)
|
|
include(ECMQtDeclareLoggingCategory)
|
|
include(ECMGenerateExportHeader)
|
|
include(KDEInstallDirs)
|
|
include(KDEClangFormat)
|
|
include(KDEGitCommitHooks)
|
|
include(KDECMakeSettings)
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
|
|
|
|
|
ecm_setup_version(${PROJECT_VERSION}
|
|
VARIABLE_PREFIX KASTS
|
|
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/kasts-version.h
|
|
)
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Sql Multimedia)
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Syndication Config I18n)
|
|
find_package(Taglib REQUIRED)
|
|
find_package(Qt5Keychain)
|
|
set_package_properties(Qt5Keychain PROPERTIES
|
|
TYPE REQUIRED
|
|
PURPOSE "Secure storage of account secrets"
|
|
)
|
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS NetworkManagerQt)
|
|
|
|
if (ANDROID)
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Svg AndroidExtras)
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2)
|
|
find_package(OpenSSL REQUIRED)
|
|
find_package(SQLite3)
|
|
find_package(ZLIB)
|
|
find_package(Gradle)
|
|
else()
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Widgets DBus)
|
|
endif()
|
|
|
|
add_definitions(-DQT_NO_CAST_FROM_ASCII
|
|
-DQT_NO_CAST_TO_ASCII
|
|
-DQT_NO_URL_CAST_FROM_STRING
|
|
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
|
-DQT_USE_QSTRINGBUILDER
|
|
-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00
|
|
)
|
|
|
|
install(PROGRAMS org.kde.kasts.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
|
install(FILES org.kde.kasts.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
|
|
install(FILES kasts.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
|
|
|
|
add_subdirectory(src)
|
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
|
|
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
|
|
|
if (NOT ANDROID)
|
|
# inside if-statement to work around problems with gitlab Android CI
|
|
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
|
endif()
|