diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ -project(klines) - 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(klines VERSION "1.6.${RELEASE_SERVICE_COMPACT_VERSION}") + set (QT_MIN_VERSION "5.9.0") set (KF5_MIN_VERSION "5.46.0") @@ -27,6 +34,7 @@ include(ECMAddAppIcon) include(ECMInstallIcons) include(KDEInstallDirs) +include(ECMSetupVersion) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(ECMQtDeclareLoggingCategory) @@ -49,6 +57,7 @@ previewitem.cpp animator.cpp ) +ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KLINES VERSION_HEADER klines_version.h) ecm_qt_declare_logging_category(klines_SRCS HEADER klines_debug.h IDENTIFIER KLINES_LOG CATEGORY_NAME org.kde.kdegames.klines) qt5_add_resources(klines_SRCS klines.qrc) kconfig_add_kcfg_files(klines_SRCS prefs.kcfgc) diff --git a/main.cpp b/main.cpp --- a/main.cpp +++ b/main.cpp @@ -28,6 +28,7 @@ #include #include #include "klines.h" +#include "klines_version.h" static const char description[] = I18N_NOOP("Kolor Lines - a little game about balls and how to get rid of them"); @@ -40,7 +41,7 @@ migrate.migrate(); KLocalizedString::setApplicationDomain("klines"); - KAboutData aboutData(QStringLiteral("klines"), i18n("Kolor Lines"), QStringLiteral("1.6"), + KAboutData aboutData(QStringLiteral("klines"), i18n("Kolor Lines"), QStringLiteral(KLINES_VERSION_STRING), i18n(description), KAboutLicense::GPL, i18n("(c) 2000-2015 The KLines Authors"), QString(), QStringLiteral("https://kde.org/applications/games/org.kde.klines")); aboutData.addAuthor(i18n("Roman Merzlyakov"), i18n("Original author"), QStringLiteral("roman@sbrf.barrt.ru"));