Commit 04127c28 authored by Dawid Wróbel's avatar Dawid Wróbel
Browse files

Revert "WIP"

This reverts commit fda82b93.
parent 628709b1
Pipeline #90534 passed with stage
in 7 minutes and 52 seconds
......@@ -458,9 +458,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
set(CMAKE_CXX_FLAGS_DEBUGKMM "${CMAKE_CXX_FLAGS_DEBUGFULL} -DKMM_DEBUG -DQT_FORCE_ASSERTS")
endif()
option(BUILD_SHARED_LIBS
"Build shared libraries" ON)
option(USE_MODELTEST
"Compile with ModelTest code (default=OFF)" OFF)
......
# SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
# Redistribution and use is allowed according to the terms of the BSD license.
#
# this file contains the following macros:
# KMM_CREATE_LINKS
# KMM_CREATE_LINKS_BIN
# KMYMONEY_ADD_PLUGIN
#############################################################################
# Create Links
......@@ -29,25 +25,3 @@ MACRO(KMM_CREATE_LINKS)
ENDFOREACH (c_FILE)
ENDMACRO(KMM_CREATE_LINKS)
if (TRUE)
function(kmymoney_add_plugin plugin)
message(TEST)
set(options)
set(oneValueArgs JSON)
set(multiValueArgs SOURCES)
cmake_parse_arguments(KC_ADD_PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT KC_ADD_PLUGIN_SOURCES)
message(FATAL_ERROR "kmymoney_add_plugin called without SOURCES parameter")
endif()
get_filename_component(json "${KC_ADD_PLUGIN_JSON}" REALPATH)
add_library(${plugin} STATIC ${KC_ADD_PLUGIN_SOURCES})
set_property(TARGET ${plugin} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json})
set_property(TARGET ${plugin} APPEND PROPERTY COMPILE_DEFINITIONS QT_STATICPLUGIN)
endfunction()
else()
function(kmymoney_add_plugin)
kcoreaddons_add_plugin(${ARGN} INSTALL_NAMESPACE kmymoney)
endfunction()
endif()
\ No newline at end of file
......@@ -24,5 +24,3 @@
#cmakedefine ENABLE_GPG 1
#cmakedefine IS_APPIMAGE 1
#cmakedefine BUILD_SHARED_LIBS 1
......@@ -124,7 +124,6 @@ if (ENABLE_SQLCIPHER)
target_compile_definitions(kmymoney
PRIVATE
QT_STATICPLUGIN
SQLITE_HAS_CODEC
SQLITE_TEMP_STORE=2)
......@@ -136,8 +135,6 @@ if (ENABLE_SQLCIPHER)
endif()
endif()
set_property(TARGET kmymoney APPEND PROPERTY COMPILE_DEFINITIONS QT_STATICPLUGIN)
target_link_libraries(kmymoney
PUBLIC
views
......@@ -163,29 +160,7 @@ target_link_libraries(kmymoney
KF5::WidgetsAddons
KF5::CoreAddons
kmm_templates
checkprinting
kcm_checkprinting
csvexporter
csvimporter
kcm_csvimporter
gncimporter
kbanking
konlinetasks_sepa
kcm_qif
qifexporter
qifimporter
reconciliationreport
sqlstorage
budgetview
forecastview
kcm_forecastview
onlinejoboutboxview
reportsview
kcm_reportsview
woob
xmlstorage
kcm_xmlstorage
$<$<BOOL:${USE_MODELTEST}>:Qt5::Test>
$<$<BOOL:${USE_MODELTEST}>:Qt5::Test>
$<$<BOOL:${ENABLE_HOLIDAYS}>:KF5::Holidays>
$<$<BOOL:${ENABLE_ACTIVITIES}>:KF5::Activities>
PRIVATE
......@@ -193,10 +168,6 @@ target_link_libraries(kmymoney
$<$<BOOL:${ENABLE_SQLCIPHER}>:PkgConfig::SQLCIPHER>
)
# when building statically, otherwise has no effect
#qt5_import_plugins(kmymoney INCLUDE interfaces settings kmm_plugin kmm_templates kmm_csvimportercore kmm_widgets kmm_mymoney)
# create symlink to let kcoreaddons find plugins
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
# First make sure that nothing is in the way so mklink will always work
......
......@@ -84,22 +84,22 @@ KSettingsPlugins::KSettingsPlugins(QWidget* parent) :
setLayout(layout); // otherwise KPluginSelector occupies very little area
layout->addWidget(d->m_pluginSelector);
auto allPluginDatas = KMyMoneyPlugin::discoverPlugins(false); // fetch all available KMyMoney plugins
auto allPluginDatas = KMyMoneyPlugin::listPlugins(false); // fetch all available KMyMoney plugins
QVector<KPluginMetaData> standardPlugins;
QVector<KPluginMetaData> payeePlugins;
QVector<KPluginMetaData> onlinePlugins;
// divide plugins in some arbitrary categories
for (const KMyMoneyPlugin::PluginMetaFactory& pluginData : allPluginDatas)
switch (KMyMoneyPlugin::pluginCategory(pluginData.pluginMetaData)) {
for (const KPluginMetaData& pluginData : allPluginDatas)
switch (KMyMoneyPlugin::pluginCategory(pluginData)) {
case KMyMoneyPlugin::Category::StandardPlugin:
standardPlugins.append(pluginData.pluginMetaData);
standardPlugins.append(pluginData);
break;
case KMyMoneyPlugin::Category::PayeeIdentifier:
payeePlugins.append(pluginData.pluginMetaData);
payeePlugins.append(pluginData);
break;
case KMyMoneyPlugin::Category::OnlineBankOperations:
onlinePlugins.append(pluginData.pluginMetaData);
onlinePlugins.append(pluginData);
break;
default:
break;
......
......@@ -1384,6 +1384,8 @@ KMyMoneyApp::KMyMoneyApp(QWidget* parent) :
kmymoney = this;
d->m_config = KSharedConfig::openConfig();
d->setThemedCSS();
MyMoneyTransactionFilter::setFiscalYearStart(KMyMoneySettings::firstFiscalMonth(), KMyMoneySettings::firstFiscalDay());
QFrame* frame = new QFrame;
......@@ -1457,7 +1459,6 @@ KMyMoneyApp::KMyMoneyApp(QWidget* parent) :
d->m_myMoneyView->setOnlinePlugins(&pPlugins.online);
setCentralWidget(frame);
d->setThemedCSS();
connect(&d->m_proc, QOverload<int,QProcess::ExitStatus>::of(&KProcess::finished), this, &KMyMoneyApp::slotBackupHandleEvents);
......@@ -2113,12 +2114,12 @@ void KMyMoneyApp::initIcons()
// if it isn't default theme then set it
if (!themeName.isEmpty() && themeName != QStringLiteral("system")) {
qDebug() << "Setting icon theme to: " << themeName;
QIcon::setThemeName(themeName);
qDebug() << "Setting icon theme to: " << themeName;
}
else {
qDebug() << "Obeying the system-wide icon theme, currently set to: " << themeName;
themeName = QIcon::themeName();
qDebug() << "Obeying the system-wide icon theme, currently set to: " << themeName;
}
}
......
......@@ -17,13 +17,12 @@
// ----------------------------------------------------------------------------
// KDE Includes
#include <KPluginLoader>
#include <KPluginFactory>
#include <KPluginInfo>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <KSharedConfig>
#include <KXMLGUIFactory>
#include <QJsonDocument>
#include <KSharedConfig>
// ----------------------------------------------------------------------------
// Project Includes
......@@ -31,10 +30,6 @@
#include "kmymoneyplugin.h"
#include "onlinepluginextended.h"
#include <QtPlugin>
Q_IMPORT_PLUGIN(CSVImporterCore)
Q_IMPORT_PLUGIN(CSVImporter)
namespace KMyMoneyPlugin
{
Category pluginCategory(const KPluginMetaData& pluginInfo)
......@@ -56,51 +51,23 @@ bool isPluginEnabled(const KPluginMetaData& pluginData, const KConfigGroup& plug
pluginData.isEnabledByDefault()); // if not found, then get default from plugin's json file
}
QMap<QString, PluginMetaFactory> discoverPlugins(bool onlyEnabled)
QMap<QString, KPluginMetaData> listPlugins(bool onlyEnabled)
{
QMap<QString, PluginMetaFactory> plugins;
const auto pluginSection(KSharedConfig::openConfig()->group(QStringLiteral("Plugins"))); // section of config where plugin on/off were saved
const auto staticPlugins = QPluginLoader::staticPlugins();
for (auto& staticPlugin : staticPlugins) {
QJsonObject jsonMetadata = staticPlugin.metaData().value(QStringLiteral("MetaData")).toObject();
auto test = QJsonDocument(jsonMetadata).toJson(QJsonDocument::JsonFormat::Indented);
KPluginMetaData pluginData(jsonMetadata, QString());
if (pluginData.serviceTypes().contains(QStringLiteral("KMyMoney/Plugin"))) {
if (!onlyEnabled || isPluginEnabled(pluginData, pluginSection)) {
plugins.insert(pluginData.pluginId(), PluginMetaFactory(pluginData, nullptr, qobject_cast<KPluginFactory*>(staticPlugin.instance())));
}
}
}
QMap<QString, KPluginMetaData> plugins;
const auto pluginDatas = KPluginLoader::findPlugins(QStringLiteral("kmymoney")); // that means search for plugins in "/lib64/plugins/kmymoney/"
const auto pluginSection(KSharedConfig::openConfig()->group(QStringLiteral("Plugins"))); // section of config where plugin on/off were saved
const auto pluginDatas = KPluginLoader::findPlugins(QStringLiteral("kmymoney")); // that means search for plugins in "/lib64/plugins/kmymoney/"
for (const KPluginMetaData& pluginData : pluginDatas) {
auto test = QJsonDocument(pluginData.rawData()).toJson(QJsonDocument::JsonFormat::Indented);
if (pluginData.serviceTypes().contains(QStringLiteral("KMyMoney/Plugin"))) {
if (!onlyEnabled || isPluginEnabled(pluginData, pluginSection)) {
// only use the first one found. Otherwise, always the last one would
// win (usually the installed system version) with the QT_PLUGIN_PATH
// env variable or the current directory having no effect on KMyMoney
if (!plugins.contains(pluginData.pluginId())) {
KPluginLoader loader(pluginData.fileName());
auto factory = loader.factory();
if (!factory) {
qWarning("Could not load plugin '%s', error: %s", qPrintable(pluginData.fileName()), qPrintable(loader.errorString()));
loader.unload();
continue;
} else
plugins.insert(pluginData.pluginId(), PluginMetaFactory(pluginData, &loader, factory));
} else {
qWarning("Could not load plugin '%s' – a plugin with the same '%s' ID already loaded",
qPrintable(pluginData.fileName()),
qPrintable(pluginData.pluginId()));
}
// only use the first one found. Otherwise, always the last one
// wins (usually the installed system version) and the QT_PLUGIN_PATH
// env variable nor the current directory have an effect for KMyMoney
if (!plugins.contains(pluginData.pluginId()))
plugins.insert(pluginData.pluginId(), pluginData);
}
}
}
return plugins;
}
......@@ -111,14 +78,14 @@ void pluginHandling(Action action, Container& ctnPlugins, QObject* parent, KXMLG
action == Action::Reorganize) {
KPluginLoader::forEachPlugin(QStringLiteral("kmymoney"), [&](const QString &pluginPath) {
KPluginMetaData metadata(pluginPath);
qDebug() << "Located shared plugin" << pluginPath << "Validity" << metadata.isValid();
qDebug() << "Located plugin" << pluginPath << "Validity" << metadata.isValid();
});
}
QMap<QString, PluginMetaFactory> referencePluginDatas;
QMap<QString, KPluginMetaData> referencePluginDatas;
if (action == Action::Load ||
action == Action::Reorganize)
referencePluginDatas = discoverPlugins(true);
referencePluginDatas = listPlugins(true);
if (action == Action::Unload ||
action == Action::Reorganize) {
......@@ -150,44 +117,49 @@ void pluginHandling(Action action, Container& ctnPlugins, QObject* parent, KXMLG
auto& refPlugins = referencePluginDatas;
for (auto it = refPlugins.cbegin(); it != refPlugins.cend(); ++it) {
if (!ctnPlugins.standard.contains(it.key())) {
qDebug() << "Loading" << (*it).pluginMetaData.fileName();
auto factory = (*it).pluginFactory;
qDebug() << "Loading" << (*it).fileName();
KPluginLoader loader((*it).fileName());
auto factory = loader.factory();
if (!factory) {
qWarning("Could not load plugin '%s', error: %s", qPrintable((*it).fileName()), qPrintable(loader.errorString()));
loader.unload();
continue;
}
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 77, 0)
Plugin* plugin = factory->create<Plugin>(parent, QVariantList{(*it).pluginMetaData.pluginId(), (*it).pluginMetaData.name()});
Plugin* plugin = factory->create<Plugin>(parent, QVariantList { (*it).pluginId(), (*it).name() });
#else
Plugin* plugin = factory->create<Plugin>(parent);
#endif
if (!plugin) {
qWarning("Failed to instantiate plugin: '%s'", qPrintable((*it).pluginMetaData.fileName()));
auto loader = (*it).pluginLoader;
if (loader)
loader->unload();
qWarning("This is not KMyMoney plugin: '%s'", qPrintable((*it).fileName()));
loader.unload();
continue;
}
ctnPlugins.standard.insert((*it).pluginMetaData.pluginId(), plugin);
ctnPlugins.standard.insert((*it).pluginId(), plugin);
plugin->plug(guiFactory);
guiFactory->addClient(plugin);
auto IOnline = qobject_cast<OnlinePlugin *>(plugin);
if (IOnline)
ctnPlugins.online.insert((*it).pluginMetaData.pluginId(), IOnline);
ctnPlugins.online.insert((*it).pluginId(), IOnline);
auto IExtended = qobject_cast<OnlinePluginExtended *>(plugin);
if (IExtended )
ctnPlugins.extended.insert((*it).pluginMetaData.pluginId(), IExtended);
ctnPlugins.extended.insert((*it).pluginId(), IExtended );
auto IImporter = qobject_cast<ImporterPlugin *>(plugin);
if (IImporter)
ctnPlugins.importer.insert((*it).pluginMetaData.pluginId(), IImporter);
ctnPlugins.importer.insert((*it).pluginId(), IImporter);
auto IStorage = qobject_cast<StoragePlugin *>(plugin);
if (IStorage)
ctnPlugins.storage.insert((*it).pluginMetaData.pluginId(), IStorage);
ctnPlugins.storage.insert((*it).pluginId(), IStorage);
auto IData = qobject_cast<DataPlugin *>(plugin);
if (IData)
ctnPlugins.data.insert((*it).pluginMetaData.pluginId(), IData);
ctnPlugins.data.insert((*it).pluginId(), IData);
}
}
......
......@@ -7,10 +7,6 @@
#ifndef PLUGINLOADER_H
#define PLUGINLOADER_H
#include <KPluginLoader>
#include <KPluginMetaData>
#include <config-kmymoney.h>
// ----------------------------------------------------------------------------
// QT Includes
......@@ -21,7 +17,6 @@ template <class Key, class T> class QMap;
// ----------------------------------------------------------------------------
// KDE Includes
class KPluginFactory;
class KPluginMetaData;
class KXMLGUIFactory;
......@@ -53,27 +48,14 @@ enum Category {
StandardPlugin,
};
struct PluginMetaFactory {
KPluginMetaData pluginMetaData;
KPluginFactory* pluginFactory;
KPluginLoader* pluginLoader;
PluginMetaFactory(KPluginMetaData m, KPluginLoader* l, KPluginFactory* f)
: pluginMetaData(m)
, pluginLoader(l)
, pluginFactory(f)
{
}
};
Category pluginCategory(const KPluginMetaData& pluginInfo);
/**
* @brief Discovers all the kmymoney plugins
* @brief It lists all kmymoney plugins
* @param onlyEnabled = true if plugins should be listed according to on/off saved state in kmymoneyrc
* @return a Map of plugin IDs and their corresponding metaData and a Factory objects
* @return
*/
QMap<QString, PluginMetaFactory> discoverPlugins(bool onlyEnabled);
QMap<QString, KPluginMetaData> listPlugins(bool onlyEnabled);
/**
* @brief It should be used to handle all plugin actions
......
......@@ -10,8 +10,9 @@ kconfig_add_kcfg_files(checkprinting_PART_SRCS pluginsettings.kcfgc)
qt5_add_resources(checkprinting_PART_SRCS checkprinting.qrc)
kmymoney_add_plugin(checkprinting
SOURCES ${checkprinting_PART_SRCS})
kcoreaddons_add_plugin(checkprinting
SOURCES ${checkprinting_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(checkprinting
......@@ -37,8 +38,9 @@ kconfig_add_kcfg_files(kcm_checkprinting_PART_SRCS pluginsettings.kcfgc)
ki18n_wrap_ui(kcm_checkprinting_PART_SRCS pluginsettingsdecl.ui)
kmymoney_add_plugin(kcm_checkprinting
SOURCES ${kcm_checkprinting_PART_SRCS})
kcoreaddons_add_plugin(kcm_checkprinting
SOURCES ${kcm_checkprinting_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
kcoreaddons_desktop_to_json(kcm_checkprinting kcm_checkprinting.desktop)
......
......@@ -15,8 +15,9 @@ ki18n_wrap_ui(csvexporter_PART_SRCS
csvexportdlg.ui
)
kmymoney_add_plugin(csvexporter
SOURCES ${csvexporter_PART_SRCS})
kcoreaddons_add_plugin(csvexporter
SOURCES ${csvexporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(csvexporter
......
......@@ -40,8 +40,9 @@ ki18n_wrap_ui(csvimporter_PART_SRCS
currenciesdlg.ui
)
kmymoney_add_plugin(csvimporter
SOURCES ${csvimporter_PART_SRCS})
kcoreaddons_add_plugin(csvimporter
SOURCES ${csvimporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
......@@ -66,8 +67,9 @@ kconfig_add_kcfg_files(kcm_csvimporter_PART_SRCS pluginsettings.kcfgc)
ki18n_wrap_ui(kcm_csvimporter_PART_SRCS pluginsettingsdecl.ui)
kmymoney_add_plugin(kcm_csvimporter
SOURCES ${kcm_csvimporter_PART_SRCS})
kcoreaddons_add_plugin(kcm_csvimporter
SOURCES ${kcm_csvimporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
kcoreaddons_desktop_to_json(kcm_csvimporter kcm_csvimporter.desktop)
......
......@@ -18,8 +18,9 @@ set(gncimporter_PART_UI
ki18n_wrap_ui(gncimporter_PART_SRCS ${gncimporter_PART_UI})
kmymoney_add_plugin(gncimporter
SOURCES ${gncimporter_PART_SRCS})
kcoreaddons_add_plugin(gncimporter
SOURCES ${gncimporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(gncimporter
......
......@@ -12,8 +12,9 @@ set ( IBANBICDATA_SCRS
bicmodel.cpp
)
kmymoney_add_plugin(ibanbicdata
SOURCES ${IBANBICDATA_SCRS})
kcoreaddons_add_plugin(ibanbicdata
SOURCES ${IBANBICDATA_SCRS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(ibanbicdata
......
......@@ -13,8 +13,9 @@ kconfig_add_kcfg_files(icalendarexporter_PART_SRCS pluginsettings.kcfgc)
qt5_add_resources(icalendarexporter_PART_SRCS icalendarexporter.qrc)
kmymoney_add_plugin(icalendarexporter
SOURCES ${icalendarexporter_PART_SRCS})
kcoreaddons_add_plugin(icalendarexporter
SOURCES ${icalendarexporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(icalendarexporter
......@@ -38,8 +39,9 @@ set(kcm_icalendarexporter_PART_SRCS
kconfig_add_kcfg_files(kcm_icalendarexporter_PART_SRCS pluginsettings.kcfgc)
ki18n_wrap_ui(kcm_icalendarexporter_PART_SRCS pluginsettingsdecl.ui)
kmymoney_add_plugin(kcm_icalendarexporter
SOURCES ${kcm_icalendarexporter_PART_SRCS})
kcoreaddons_add_plugin(kcm_icalendarexporter
SOURCES ${kcm_icalendarexporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
kcoreaddons_desktop_to_json(kcm_icalendarexporter kcm_icalendarexporter.desktop)
......
......@@ -37,8 +37,9 @@ qt5_add_resources(kbanking_PART_SRCS "${CMAKE_CURRENT_BINARY_DIR}/kbanking.qrc")
qt5_add_resources(kbanking_PART_SRCS "qml/chipTan/chipTan.qrc")
kmymoney_add_plugin(kbanking
SOURCES ${kbanking_PART_SRCS})
kcoreaddons_add_plugin(kbanking
SOURCES ${kbanking_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(kbanking
......
......@@ -22,8 +22,9 @@ ki18n_wrap_ui(ofximporter_PART_SRCS ${ofximporter_PART_UI})
qt5_add_resources(ofximporter_PART_SRCS ofximporter.qrc)
kmymoney_add_plugin(ofximporter
SOURCES ${ofximporter_PART_SRCS})
kcoreaddons_add_plugin(ofximporter
SOURCES ${ofximporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(ofximporter
......
......@@ -6,8 +6,9 @@ set(onlinejobpluginmockup_PART_SRCS
onlinejobpluginmockup.cpp
)
kmymoney_add_plugin(onlinejobpluginmockup
SOURCES ${onlinejobpluginmockup_PART_SRCS})
kcoreaddons_add_plugin(onlinejobpluginmockup
SOURCES ${onlinejobpluginmockup_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(onlinejobpluginmockup
......
......@@ -12,8 +12,9 @@ ki18n_wrap_ui( sepaOnlineTasks_SRCS
add_library(konlinetasks_sepa_interface INTERFACE)
kmymoney_add_plugin(konlinetasks_sepa
SOURCES ${sepaOnlineTasks_SRCS})
kcoreaddons_add_plugin(konlinetasks_sepa
SOURCES ${sepaOnlineTasks_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(konlinetasks_sepa
......
......@@ -9,11 +9,13 @@ ki18n_wrap_ui(kcm_qif_PART_SRCS mymoneyqifprofileeditor.ui)
#dirty hack: kcm_qif doesn't need json but build fails if it isn't found
if(ENABLE_QIFIMPORTER)
kmymoney_add_plugin(kcm_qif
SOURCES ${kcm_qif_PART_SRCS})
kcoreaddons_add_plugin(kcm_qif
SOURCES ${kcm_qif_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
elseif(ENABLE_QIFEXPORTER)
kmymoney_add_plugin(kcm_qif
SOURCES ${kcm_qif_PART_SRCS})
kcoreaddons_add_plugin(kcm_qif
SOURCES ${kcm_qif_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
endif()
if(ENABLE_QIFIMPORTER)
......
......@@ -18,8 +18,9 @@ ki18n_wrap_ui(qifexporter_PART_SRCS ${qifexporter_PART_UI})
qt5_add_resources(qifexporter_PART_SRCS qifexporter.qrc)
kmymoney_add_plugin(qifexporter
SOURCES ${qifexporter_PART_SRCS})
kcoreaddons_add_plugin(qifexporter
SOURCES ${qifexporter_PART_SRCS}
INSTALL_NAMESPACE "kmymoney")
#kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE}
set_target_properties(qifexporter
......
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