-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
739 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,70 @@ | ||
cmake_minimum_required(VERSION 3.10.0) | ||
cmake_minimum_required(VERSION 3.19) | ||
|
||
project("AppCenter" | ||
VERSION "0.1.0" | ||
DESCRIPTION "Software center" | ||
LANGUAGES CXX C | ||
) | ||
|
||
## Shared macros and functions: | ||
if(NOT LIRI_LOCAL_ECM) | ||
find_package(LiriCMakeShared "2.0.0" REQUIRED NO_MODULE) | ||
list(APPEND CMAKE_MODULE_PATH "${LCS_MODULE_PATH}") | ||
## Only build on the appropriate platforms. | ||
if(NOT UNIX OR ANDROID) | ||
message(NOTICE "\"${CMAKE_PROJECT_NAME}\" can be build only on UNIX-like systems, Android excluded") | ||
return() | ||
endif() | ||
|
||
## Add some paths to check for CMake modules: | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
## Set C++ standard: | ||
set(CMAKE_CXX_STANDARD 17) | ||
## ECM: | ||
find_package(ECM 5.245.0 REQUIRED NO_MODULE) | ||
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) | ||
|
||
## Set minimum versions required. | ||
set(QT_MIN_VERSION "5.10.0") | ||
## Installation directories: | ||
include(KDEInstallDirs) | ||
|
||
## Liri specific setup common for all modules: | ||
include(LiriSetup) | ||
## Compiler settings: | ||
set(KDE_SKIP_NULLPTR_WARNINGS_SETTINGS TRUE) | ||
include(KDECompilerSettings NO_POLICY_SCOPE) | ||
|
||
## Only build on the appropriate platforms. | ||
if(NOT UNIX OR ANDROID) | ||
message(NOTICE "Skipping the build as the condition \"UNIX OR ANDROID\" is not met.") | ||
return() | ||
endif() | ||
## CMake settings: | ||
include(KDECMakeSettings) | ||
|
||
## Find Qt 5. | ||
find_package(Qt5 "${QT_MIN_VERSION}" | ||
CONFIG REQUIRED | ||
COMPONENTS | ||
Core | ||
DBus | ||
Concurrent | ||
Gui | ||
Qml | ||
Quick | ||
QuickControls2 | ||
LinguistTools | ||
) | ||
## QML module: | ||
include(ECMQmlModule) | ||
|
||
## Disable use of C++ API deprecated in Qt 5.15 | ||
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00) | ||
|
||
## Enable C++17: | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
## Treat warnings as errors: | ||
add_compile_options(-Wall -Wextra -Werror) | ||
|
||
## Shared macros and functions: | ||
if(NOT LIRI_LOCAL_ECM) | ||
find_package(LiriCMakeShared "2.0.99" REQUIRED NO_MODULE) | ||
list(APPEND CMAKE_MODULE_PATH "${LCS_MODULE_PATH}") | ||
endif() | ||
|
||
## Liri specific setup common for all modules: | ||
include(LiriSetup) | ||
|
||
## Features: | ||
include(features.cmake) | ||
|
||
## QML import path: | ||
if(NOT QML_IMPORT_PATH) | ||
set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/bin CACHE STRING "" FORCE) | ||
endif() | ||
|
||
## Add subdirectories: | ||
add_subdirectory(src/framework) | ||
add_subdirectory(src/app) | ||
add_subdirectory(src/notifier) | ||
add_subdirectory(src/imports/appcenter) | ||
if(LINUX AND NOT ANDROID) | ||
if(LINUX AND NOT ANDROID AND TARGET PkgConfig::Flatpak) | ||
add_subdirectory(src/plugins/flatpak) | ||
endif() | ||
add_subdirectory(src/plugins/odrs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# SPDX-FileCopyrightText: 2024 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
## Enable feature summary at the end of the configure run: | ||
include(FeatureSummary) | ||
|
||
## Set minimum versions required: | ||
set(QT_MIN_VERSION "6.7.0") | ||
|
||
## Find Qt: | ||
find_package(Qt6 "${QT_MIN_VERSION}" | ||
REQUIRED | ||
COMPONENTS | ||
Core | ||
Core5Compat | ||
DBus | ||
Concurrent | ||
Gui | ||
Qml | ||
QmlIntegration | ||
Quick | ||
QuickControls2 | ||
LinguistTools | ||
) | ||
|
||
## Silence old policy warnings: | ||
qt6_policy(SET QTP0004 OLD) | ||
|
||
## Find AppStreamQt: | ||
find_package(AppStreamQt REQUIRED) | ||
|
||
## Find Flatpak: | ||
option(FEATURE_appcenter_flatpak "Flatpak support" ON) | ||
if(FEATURE_appcenter_flatpak) | ||
find_package(Flatpak QUIET) | ||
set_package_properties(Flatpak PROPERTIES | ||
TYPE RECOMMENDED | ||
PURPOSE "Flatpak support" | ||
) | ||
if(NOT TARGET PkgConfig::Flatpak) | ||
message(WARNING "You need Flatpak for AppCenter::Flatpak") | ||
set(FEATURE_appcenter_flatpak OFF) | ||
endif() | ||
endif() | ||
add_feature_info("AppCenter::Flatpak" FEATURE_appcenter_flatpak "Build support for Flatpak") | ||
set(FEATURE_appcenter_flatpak "$<IF:${FEATURE_appcenter_flatpak},1,0>") | ||
|
||
#### Features | ||
|
||
## Features summary: | ||
if(NOT LIRI_SUPERBUILD) | ||
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,61 @@ | ||
# Translations | ||
file(GLOB LiriAppCenter_TRANSLATIONS "${CMAKE_SOURCE_DIR}/translations/app/*_*.ts") | ||
qt5_add_translation(LiriAppCenter_QM_FILES ${LiriAppCenter_TRANSLATIONS}) | ||
install(FILES ${LiriAppCenter_QM_FILES} | ||
DESTINATION "${INSTALL_DATADIR}/liri-appcenter/translations") | ||
#file(GLOB LiriAppCenter_TRANSLATIONS "${CMAKE_SOURCE_DIR}/translations/app/*_*.ts") | ||
#qt5_add_translation(LiriAppCenter_QM_FILES ${LiriAppCenter_TRANSLATIONS}) | ||
#install(FILES ${LiriAppCenter_QM_FILES} | ||
# DESTINATION "${INSTALL_DATADIR}/liri-appcenter/translations") | ||
|
||
liri_add_executable(LiriAppCenter | ||
OUTPUT_NAME | ||
"liri-appcenter" | ||
SOURCES | ||
main.cpp | ||
${LiriAppCenter_QM_FILES} | ||
RESOURCES | ||
appcenter.qrc | ||
DEFINES | ||
qt6_add_executable(LiriAppCenter MANUAL_FINALIZATION main.cpp) | ||
set_target_properties(LiriAppCenter PROPERTIES OUTPUT_NAME "liri-appcenter") | ||
qt6_finalize_target(LiriAppCenter) | ||
|
||
target_compile_definitions(LiriAppCenter | ||
PRIVATE | ||
APPCENTER_VERSION="${PROJECT_VERSION}" | ||
QT_NO_CAST_FROM_ASCII | ||
QT_NO_FOREACH | ||
APPCENTER_VERSION="${PROJECT_VERSION}" | ||
APPDATA | ||
"${CMAKE_CURRENT_SOURCE_DIR}/io.liri.AppCenter.appdata.xml" | ||
DESKTOP | ||
"${CMAKE_CURRENT_SOURCE_DIR}/io.liri.AppCenter.desktop" | ||
LIBRARIES | ||
Qt5::Core | ||
Qt5::Gui | ||
Qt5::Qml | ||
Qt5::Quick | ||
Qt5::QuickControls2 | ||
GUI | ||
) | ||
|
||
liri_finalize_executable(LiriAppCenter) | ||
target_link_libraries(LiriAppCenter | ||
PRIVATE | ||
Qt6::Core | ||
Qt6::Gui | ||
Qt6::Qml | ||
Qt6::Quick | ||
Qt6::QuickControls2 | ||
) | ||
|
||
qt6_add_qml_module(LiriAppCenter | ||
URI io.liri.AppCenter | ||
VERSION 1.0 | ||
QML_FILES | ||
qml/AddSourceDialog.qml | ||
qml/AllAppsTab.qml | ||
qml/AppPage.qml | ||
qml/InstalledAppsTab.qml | ||
qml/Main.qml | ||
qml/SourcesTab.qml | ||
qml/UpdatesTab.qml | ||
qml/app/Buttons.qml | ||
qml/app/Details.qml | ||
qml/app/Header.qml | ||
qml/app/HeaderRatings.qml | ||
qml/app/Icon.qml | ||
qml/app/Info.qml | ||
qml/app/RatingsReviews.qml | ||
qml/app/Review.qml | ||
qml/app/Screenshots.qml | ||
qml/app/Transaction.qml | ||
qml/pages/AddReviewPage.qml | ||
qml/pages/ReviewsPage.qml | ||
qml/ratings/RatingNumber.qml | ||
qml/ratings/RatingStar.qml | ||
qml/ratings/StarIcon.qml | ||
qml/ratings/StarRatings.qml | ||
) | ||
|
||
install(TARGETS LiriAppCenter DESTINATION ${KDE_INSTALL_BINDIR}) | ||
|
||
install(FILES "io.liri.AppCenter.appdata.xml" | ||
DESTINATION ${KDE_INSTALL_METAINFODIR}) | ||
install(FILES "io.liri.AppCenter.desktop" | ||
DESTINATION ${KDE_INSTALL_APPDIR}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.