diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ -project (bovo) +cmake_minimum_required (VERSION 3.0.0 FATAL_ERROR) + +# KDE Application Version, managed by release script +set(KDE_APPLICATIONS_VERSION_MAJOR "19") +set(KDE_APPLICATIONS_VERSION_MINOR "03") +set(KDE_APPLICATIONS_VERSION_MICRO "70") +set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") + +project(bovo VERSION ${KDE_APPLICATIONS_VERSION}) -cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) set (QT_MIN_VERSION "5.7.0") set (KF5_MIN_VERSION "5.30.0") @@ -24,6 +31,11 @@ include(ECMInstallIcons) include(ECMAddAppIcon) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/config-bovo.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config-bovo.h +) + # re-enabling exceptions (turned off in KDE) kde_enable_exceptions() diff --git a/config-bovo.h.cmake b/config-bovo.h.cmake new file mode 100644 --- /dev/null +++ b/config-bovo.h.cmake @@ -0,0 +1,3 @@ +/* Bovo's application version string + * It is adopted from script updated KDE Application version in top-level CMakeLists.txt */ +#define BOVO_VERSION_STRING "@bovo_VERSION@" diff --git a/gui/main.cc b/gui/main.cc --- a/gui/main.cc +++ b/gui/main.cc @@ -28,7 +28,7 @@ #include #include "mainwindow.h" -#include "version.h" +#include "config-bovo.h" static const char description[] = I18N_NOOP("KDE Five in a Row Board Game"); static const char copyleft[] = I18N_NOOP("(c) 2002-2007, Aron Boström"); @@ -46,7 +46,7 @@ KLocalizedString::setApplicationDomain("bovo"); KAboutData aboutData(QStringLiteral("bovo"), i18n("Bovo"), - QStringLiteral(BOVO_VERSION), i18n(description), KAboutLicense::GPL, + QStringLiteral(BOVO_VERSION_STRING), i18n(description), KAboutLicense::GPL, i18n(copyleft), QString(), QStringLiteral("http://games.kde.org/bovo")); aboutData.addAuthor(i18n("Aron Boström"),i18n("Author"), QStringLiteral("aron.bostrom@gmail.com")); diff --git a/gui/version.h b/gui/version.h deleted file mode 100644 --- a/gui/version.h +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************* -* -* Copyright 2007 Aron Boström -* -* Bovo is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2, or (at your option) -* any later version. -* -* Bovo is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Bovo; see the file COPYING. If not, write to -* the Free Software Foundation, 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301, USA. -* -********************************************************************/ - -#ifndef BOVO_VERSION -#define BOVO_VERSION "1.1" -#endif