Commit 8ff57615 authored by Nicolas Fella's avatar Nicolas Fella

Use ecm_setup_version to generate version header

parent ecbdf390
......@@ -18,10 +18,14 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(ECMSetupVersion)
include(ECMOptionalAddSubdirectory)
include(FindPkgConfig)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX PLASMAPA
VERSION_HEADER ${CMAKE_BINARY_DIR}/version.h)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
Core
Gui
......
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
file(GLOB QML_SRCS package/contents/ui/*.qml)
......
......@@ -37,7 +37,7 @@ KCMPulseAudio::KCMPulseAudio(QObject *parent, const QVariantList &args)
{
KAboutData *aboutData = new KAboutData("kcm_pulseaudio",
i18nc("@title", "Audio"),
global_s_versionStringFull,
QStringLiteral(PLASMAPA_VERSION_STRING),
QStringLiteral(""),
KAboutLicense::LicenseKey::GPL_V3,
i18nc("@info:credit", "Copyright 2015 Harald Sitter"));
......
/*
Copyright (C) 2012 Harald Sitter <apachelogger@ubuntu.com>
This program 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 of
the License or (at your option) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VERSION_H
#define VERSION_H
static const char global_s_versionString[] = "${VERSION_STRING}";
static const char global_s_versionStringFull[] = "${VERSION_STRING_FULL}";
#endif // VERSION_H
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