diff --git a/src/kpackage-install-handlers/kns/CMakeLists.txt b/src/kpackage-install-handlers/kns/CMakeLists.txt --- a/src/kpackage-install-handlers/kns/CMakeLists.txt +++ b/src/kpackage-install-handlers/kns/CMakeLists.txt @@ -1,3 +1,4 @@ +configure_file(knshandlerversion.h.in knshandlerversion.h) add_executable(knshandler main.cpp) target_link_libraries(knshandler KF5::NewStuffCore KF5::I18n KF5::Notifications Qt5::Xml) diff --git a/src/kpackage-install-handlers/kns/knshandlerversion.h.in b/src/kpackage-install-handlers/kns/knshandlerversion.h.in new file mode 100644 --- /dev/null +++ b/src/kpackage-install-handlers/kns/knshandlerversion.h.in @@ -0,0 +1,28 @@ +/* This file is part of the KDE libraries + * Copyright (C) 2019 Dan Leinir Turthra Jensen + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License or ( at + * your option ) version 3 or, at the discretion of KDE e.V. ( which shall + * act as a proxy as in section 14 of the GPLv3 ), any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KNSHANDLERVERSION_H +#define KNSHANDLERVERSION_H + +#include + +static QLatin1String knshandlerversion("@PROJECT_VERSION@"); + +#endif//KNSHANDLERVERSION_H diff --git a/src/kpackage-install-handlers/kns/main.cpp b/src/kpackage-install-handlers/kns/main.cpp --- a/src/kpackage-install-handlers/kns/main.cpp +++ b/src/kpackage-install-handlers/kns/main.cpp @@ -33,9 +33,13 @@ #include #include +#include "knshandlerversion.h" + int main(int argc, char** argv) { QCoreApplication app(argc, argv); + app.setApplicationName(QLatin1String("kpackage-knshandler")); + app.setApplicationVersion(knshandlerversion); app.setQuitLockEnabled(false); Q_ASSERT(app.arguments().count() == 2);