Version number is now set in a single place

This commit is contained in:
Albert Vaca 2015-02-04 23:52:07 -08:00
parent dcfec8c593
commit c013966f4b
6 changed files with 19 additions and 13 deletions

View file

@ -1,5 +1,10 @@
project(kdeconnect)
set(KDECONNECT_VERSION_MAJOR 0)
set(KDECONNECT_VERSION_MINOR 8)
set(KDECONNECT_VERSION_PATCH 0)
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")
cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 0.0.9 REQUIRED NO_MODULE)
@ -9,6 +14,8 @@ find_package(Qt5 5.2 REQUIRED COMPONENTS Quick Test)
find_package(KF5 REQUIRED COMPONENTS I18n KIO Notifications ConfigWidgets DBusAddons KCMUtils IconThemes)
find_package(Qca-qt5 2.1.0 REQUIRED)
configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)

View file

@ -1,5 +1,5 @@
/*
* Copyright 2013 Aleix Pol Gonzalez <aleixpol@kde.org>
* Copyright 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -28,11 +28,17 @@
#include <KLocalizedString>
#include <QTextStream>
#include "../kdeconnect-version.h"
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
KAboutData about("kdeconnect-cli", i18n("kdeconnect-cli"), "1.0", i18n("KDE Connect CLI tool"),
KAboutLicense::GPL, i18n("(C) 2013 Aleix Pol Gonzalez"));
KAboutData about("kdeconnect-cli",
"kdeconnect-cli",
QLatin1String(KDECONNECT_VERSION_STRING),
i18n("KDE Connect CLI tool"),
KAboutLicense::GPL,
i18n("(C) 2015 Aleix Pol Gonzalez"));
KAboutData::setApplicationData(about);
about.addAuthor( i18n("Aleix Pol Gonzalez"), QString(), "aleixpol@kde.org" );

View file

@ -2,11 +2,6 @@ project(KDEConnectCore)
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
set(KDECONNECT_VERSION_MAJOR 1)
set(KDECONNECT_VERSION_MINOR 0)
set(KDECONNECT_VERSION_PATCH 1)
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)

View file

@ -1,7 +1,3 @@
set(KDECONNECT_VERSION_MAJOR 1)
set(KDECONNECT_VERSION_MINOR 0)
set(KDECONNECT_VERSION_PATCH 1)
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")
include_directories(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}

2
kdeconnect-version.h.in Normal file
View file

@ -0,0 +1,2 @@
#define KDECONNECT_VERSION_STRING "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}"

View file

@ -61,7 +61,7 @@ int main(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setApplicationName("kdeconnect");
app.setApplicationVersion("0.1");
app.setApplicationVersion(QLatin1String(KDECONNECT_VERSION_STRING));
app.setOrganizationDomain("kde.org");
app.setQuitOnLastWindowClosed(false);