diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ -PROJECT(ksquares) - 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(ksquares VERSION "0.6.${RELEASE_SERVICE_COMPACT_VERSION}") + set (QT_MIN_VERSION "5.7.0") set (KF5_MIN_VERSION "5.30.0") @@ -25,6 +32,7 @@ include(FeatureSummary) include(ECMAddAppIcon) include(ECMInstallIcons) +include(ECMSetupVersion) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,6 +13,8 @@ scoresdialog.cpp ) +ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KSQUARES VERSION_HEADER ksquares_version.h) + qt5_add_resources(ksquares_SRCS ksquares.qrc) ki18n_wrap_ui(ksquares_SRCS newgamewidget.ui scoreswidget.ui prefs_ai.ui prefs_display.ui) diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -20,12 +20,11 @@ #include "ksquareswindow.h" #include "ksquaresdemowindow.h" #include "settings.h" +#include "ksquares_version.h" static const char description[] = I18N_NOOP("Take it in turns to draw lines.\nIf you complete a squares, you get another go."); -static const char version[] = "0.6"; - int main(int argc, char **argv) { QApplication app(argc, argv); @@ -35,7 +34,7 @@ migrate.setUiFiles(QStringList() << QStringLiteral("ksquaresui.rc")); migrate.migrate(); KLocalizedString::setApplicationDomain("ksquares"); - KAboutData about(QStringLiteral("ksquares"), i18n("KSquares"), QLatin1String(version), i18n(description), + KAboutData about(QStringLiteral("ksquares"), i18n("KSquares"), QStringLiteral(KSQUARES_VERSION_STRING), i18n(description), KAboutLicense::GPL, i18n("(C) 2006-2007 Matt Williams")); about.addAuthor(i18n("Matt Williams"), i18n("Original creator and maintainer"), QStringLiteral("matt@milliams.com"), QStringLiteral("https://milliams.com")); about.addCredit(i18n("Fela Winkelmolen"), i18n("Many patches and bugfixes"));