diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ -project(palapeli) - cmake_minimum_required (VERSION 3.5 FATAL_ERROR) + +set (RELEASE_SERVICE_VERSION_MAJOR "20") +set (RELEASE_SERVICE_VERSION_MINOR "03") +set (RELEASE_SERVICE_VERSION_MICRO "70") +set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") +set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}") + +project(palapeli VERSION "2.1.${RELEASE_SERVICE_COMPACT_VERSION}") + set (QT_MIN_VERSION "5.9.0") set (KF5_MIN_VERSION "5.46.0") @@ -31,6 +38,7 @@ include(FeatureSummary) include(ECMAddAppIcon) include(ECMInstallIcons) +include(ECMSetupVersion) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,6 +45,7 @@ window/pieceholder.cpp ) +ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX PALAPELI VERSION_HEADER palapeli_version.h) ecm_qt_declare_logging_category(palapeli_SRCS HEADER palapeli_debug.h IDENTIFIER PALAPELI_LOG CATEGORY_NAME org.kde.palapeli) kconfig_add_kcfg_files(palapeli_SRCS settings.kcfgc) diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -18,6 +18,7 @@ #include "importhelper.h" #include "window/mainwindow.h" +#include "palapeli_version.h" #include #include @@ -34,7 +35,7 @@ KLocalizedString::setApplicationDomain("palapeli"); - KAboutData about(QStringLiteral("palapeli"), i18nc("The application's name", "Palapeli"), QStringLiteral("2.1"), i18n("KDE Jigsaw Puzzle Game"), KAboutLicense::GPL, i18n("Copyright 2009, 2010, Stefan Majewsky")); + KAboutData about(QStringLiteral("palapeli"), i18nc("The application's name", "Palapeli"), PALAPELI_VERSION_STRING, i18n("KDE Jigsaw Puzzle Game"), KAboutLicense::GPL, i18n("Copyright 2009, 2010, Stefan Majewsky")); about.addAuthor(i18n("Stefan Majewsky"), QString(), QStringLiteral("majewsky@gmx.net"), QStringLiteral("https://majewsky.wordpress.com/")); about.addCredit (i18n ("Johannes Loehnert"), i18n ("The option to preview the completed puzzle"),