Commit aa277e52 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Set and make use of RELEASE_SERVICE_VERSION variables

NO_CHANGELOG
parent 7bcd6d80
cmake_minimum_required(VERSION 3.0)
# Release Service version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "80")
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(kde-dev-utils VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.9.0")
set(KF_MIN_VERSION "5.53.0")
......@@ -12,6 +21,7 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
# Required for ki18n_install(po)
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS I18n)
......
project(kpartloader)
########### kpartloader ###############
# Bump KPARTLOADER_BASE_VERSION once new features are added
set(KPARTLOADER_BASE_VERSION "1.1")
set(KPARTLOADER_VERSION "${KPARTLOADER_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE
COMPONENTS
......@@ -13,6 +14,11 @@ find_package(KF5 ${KF_MIN_VERSION} REQUIRED
WidgetsAddons
)
ecm_setup_version(${KPARTLOADER_VERSION}
VARIABLE_PREFIX KPARTLOADER
VERSION_HEADER kpartloader_version.h
)
set(kpartloader_SRCS
kpartloader.cpp
)
......
......@@ -20,6 +20,8 @@
#include "kpartloader.h"
// app
#include "kpartloader_version.h"
// KF
#include <KAboutData>
#include <KActionCollection>
......@@ -84,12 +86,16 @@ int main( int argc, char **argv )
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QApplication app(argc, argv);
const char version[] = "v 1.1";
KLocalizedString::setApplicationDomain("kpartloader");
KAboutData aboutData(QLatin1String("kpartloader"), i18n("kpartloader"), QLatin1String(version));
aboutData.setShortDescription(i18n("This is a test application for KParts."));
KAboutData aboutData(
QStringLiteral("kpartloader"),
i18n("kpartloader"),
QStringLiteral(KPARTLOADER_VERSION_STRING),
i18n("This is a test application for KParts."),
KAboutLicense::GPL
);
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
......
project(kuiviewer)
# Bump KUIVIEWER_BASE_VERSION once new features are added
set(KUIVIEWER_BASE_VERSION "0.3")
set(KUIVIEWER_VERSION "${KUIVIEWER_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")
include(ECMAddAppIcon)
......@@ -28,7 +30,10 @@ add_definitions(
-DQT_NO_URL_CAST_FROM_STRING
)
########### next target ###############
ecm_setup_version(${KUIVIEWER_VERSION}
VARIABLE_PREFIX KUIVIEWER
VERSION_HEADER kuiviewer_version.h
)
set(kuiviewer_SRCS main.cpp kuiviewer.cpp )
......@@ -46,8 +51,6 @@ target_link_libraries(kuiviewer KF5::Parts )
install(TARGETS kuiviewer ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### next target ###############
set(kuiviewerpart_PART_SRCS kuiviewer_part.cpp )
qt5_add_resources(kuiviewerpart_PART_SRCS
......@@ -69,8 +72,6 @@ install(TARGETS kuiviewerpart DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/parts )
install(FILES org.kde.kuiviewerpart.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
########### next target ###############
set(quithumbnail_PART_SRCS quicreator.cpp )
add_library(quithumbnail MODULE ${quithumbnail_PART_SRCS})
......@@ -83,9 +84,6 @@ target_link_libraries(quithumbnail
install(TARGETS quithumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install( PROGRAMS org.kde.kuiviewer.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES designerthumbnail.desktop kuiviewer_part.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install(FILES org.kde.kuiviewer.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
......
......@@ -23,8 +23,9 @@
#include "kuiviewer_part.h"
// part
#include <kuiviewer_part_debug.h>
#include "kuiviewer_version.h"
// KF
#include <KActionCollection>
#include <KSelectAction>
......@@ -62,7 +63,7 @@ KUIViewerPart::KUIViewerPart(QWidget* parentWidget,
// we need an instance
KAboutData about(QStringLiteral("kuiviewerpart"),
i18n("KUIViewerPart"),
QStringLiteral("0.3.0"),
QStringLiteral(KUIVIEWER_VERSION_STRING),
i18n("Displays Designer's UI files"),
KAboutLicense::LGPL);
about.addAuthor(i18n("Richard Moore"), i18n("Original author"), QStringLiteral("rich@kde.org"));
......
......@@ -21,6 +21,8 @@
#include "kuiviewer.h"
// app
#include "kuiviewer_version.h"
// KF
#include <KAboutData>
#include <KLocalizedString>
......@@ -39,7 +41,8 @@ int main(int argc, char** argv)
KLocalizedString::setApplicationDomain("kuiviewer");
KAboutData about(QStringLiteral("kuiviewer"), i18n("KUIViewer"), QStringLiteral("0.3.0"),
KAboutData about(QStringLiteral("kuiviewer"), i18n("KUIViewer"),
QStringLiteral(KUIVIEWER_VERSION_STRING),
i18n("Displays Designer's UI files"),
KAboutLicense::LGPL);
about.addAuthor(i18n("Richard Moore"), i18n("Original author"), QStringLiteral("rich@kde.org"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment