summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2016-07-13 09:22:25 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-07-13 17:28:15 (GMT)
commite4d2bc48ffe5c28f16f98305b7aaf566321aa4d1 (patch)
tree82dd03bf4d847637f816916c25ae22c53e92d280
parentb2cddf2058a7eb51f18ca3f88d337c5e487f5fb5 (diff)
set version number in CMakeLists.txt
Also switch to the KDE Applications version number.
-rw-r--r--CMakeLists.txt8
-rw-r--r--main.cpp4
2 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb99d12..49492e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+# KDE Application Version, managed by release script
+set (KDE_APPLICATIONS_VERSION_MAJOR "16")
+set (KDE_APPLICATIONS_VERSION_MINOR "07")
+set (KDE_APPLICATIONS_VERSION_MICRO "70")
+set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
+
project(kgpg)
set(QT_MIN_VERSION "5.3.0")
@@ -224,6 +230,8 @@ if (KGPG_DEBUG_TRANSACTIONS)
set_target_properties(kgpg PROPERTIES COMPILE_DEFINITIONS "${KGPG_FLAGS}")
endif (KGPG_DEBUG_TRANSACTIONS)
+set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS "KGPG_VERSION=\"${KDE_APPLICATIONS_VERSION}\"")
+
target_link_libraries(kgpg
KF5::AkonadiContact
KF5::Archive
diff --git a/main.cpp b/main.cpp
index 6f3cd60..f5496b8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -23,11 +23,9 @@
static const char description[] =
I18N_NOOP("KGpg - simple gui for gpg\n\nKGpg was designed to make gpg very easy to use.\nI tried to make it as secure as possible.\nHope you enjoy it.");
-static const char version[] = "2.17.40";
-
int main(int argc, char *argv[])
{
- K4AboutData about("kgpg", 0, ki18n("KGpg"), version, ki18n(description), K4AboutData::License_GPL, ki18n("(C) 2003 Jean-Baptiste Mardelle"), KLocalizedString(), "http://utils.kde.org/projects/kgpg");
+ K4AboutData about("kgpg", 0, ki18n("KGpg"), KGPG_VERSION, ki18n(description), K4AboutData::License_GPL, ki18n("(C) 2003 Jean-Baptiste Mardelle"), KLocalizedString(), "http://utils.kde.org/projects/kgpg");
about.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("Author and former maintainer"), "bj@altern.org");
about.addAuthor(ki18n("Jimmy Gilles"), KLocalizedString(), "jimmygilles@gmail.com");
about.addAuthor(ki18n("Rolf Eike Beer"), ki18n("Maintainer"), "kde@opensource.sf-tec.de");