Commit 125e7d84 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[korganizer/plugins] Embed JSON metadata and install to korganizer namespace

parent 34443613
Pipeline #169341 passed with stage
in 13 minutes and 55 seconds
......@@ -2,9 +2,11 @@
# SPDX-License-Identifier: BSD-3-Clause
########### next target ###############
add_library(korg_datenums MODULE)
add_library(datenums MODULE)
target_sources(korg_datenums PRIVATE
kcoreaddons_desktop_to_json(datenums datenums.desktop)
target_sources(datenums PRIVATE
configdialog.cpp
datenums.cpp
configdialog.h
......@@ -12,20 +14,13 @@ target_sources(korg_datenums PRIVATE
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(korg_datenums PROPERTIES UNITY_BUILD ON)
set_target_properties(datenums PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(korg_datenums
target_link_libraries(datenums
KF5::EventViews
)
install(TARGETS
korg_datenums
DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
########### install files ###############
install(FILES
datenums.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR}/korganizer
datenums
DESTINATION ${KDE_INSTALL_PLUGINDIR}/korganizer
)
......@@ -15,7 +15,7 @@
#include <KLocalizedString>
#include <KPluginFactory>
K_PLUGIN_FACTORY(DatenumsFactory, registerPlugin<Datenums>();)
K_PLUGIN_CLASS_WITH_JSON(Datenums, "datenums.json")
Datenums::Datenums(QObject *parent, const QVariantList &args)
: Decoration(parent, args)
......
########### next target ###############
find_package(KF5KDELibs4Support ${KF5_MIN_VERSION} CONFIG REQUIRED) #for the korganizer hebrew plugin
add_library(korg_hebrew MODULE)
target_sources(korg_hebrew PRIVATE
add_library(hebrew MODULE)
target_sources(hebrew PRIVATE
qcalendarsystem.cpp
configdialog.cpp
converter.cpp
......@@ -11,23 +11,18 @@ target_sources(korg_hebrew PRIVATE
parsha.cpp
)
ecm_qt_declare_logging_category(korg_hebrew HEADER korganizer_hebrew_debug.h IDENTIFIER KORGANIZER_HEBREWPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_hebrew_plugin)
kcoreaddons_desktop_to_json(hebrew hebrew.desktop)
ecm_qt_declare_logging_category(hebrew HEADER korganizer_hebrew_debug.h IDENTIFIER KORGANIZER_HEBREWPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_hebrew_plugin)
target_link_libraries(korg_hebrew
target_link_libraries(hebrew
KF5::EventViews
KF5::I18n
KF5::KDELibs4Support
)
install(TARGETS
korg_hebrew
DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
########### install files ###############
install(FILES
hebrew.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR}/korganizer
hebrew
DESTINATION ${KDE_INSTALL_PLUGINDIR}/korganizer
)
......@@ -19,7 +19,7 @@
#include <KPluginFactory>
#include <QLocale>
K_PLUGIN_FACTORY(HebrewFactory, registerPlugin<Hebrew>();)
K_PLUGIN_CLASS_WITH_JSON(Hebrew, "hebrew.json")
using namespace EventViews::CalendarDecoration;
......
......@@ -3,25 +3,22 @@
########### next target ###############
add_library(korg_lunarphases MODULE lunarphases.cpp)
add_library(lunarphases MODULE lunarphases.cpp)
target_link_libraries(korg_lunarphases
kcoreaddons_desktop_to_json(lunarphases lunarphases.desktop)
target_link_libraries(lunarphases
KF5::Holidays
KF5::EventViews
)
install(TARGETS
korg_lunarphases
DESTINATION ${KDE_INSTALL_PLUGINDIR}
lunarphases
DESTINATION ${KDE_INSTALL_PLUGINDIR}/korganizer
)
########### install files ###############
install(FILES
lunarphases.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR}/korganizer
)
include(ECMInstallIcons)
ecm_install_icons(
ICONS
......
......@@ -12,7 +12,7 @@
#include <KLocalizedString>
#include <KPluginFactory>
K_PLUGIN_FACTORY(LunarphasesFactory, registerPlugin<Lunarphases>();)
K_PLUGIN_CLASS_WITH_JSON(Lunarphases, "lunarphases.json")
static QIcon phaseIcon(KHolidays::LunarPhase::Phase phase)
{
......
########### next target ###############
add_library(korg_picoftheday MODULE)
add_library(picoftheday MODULE)
target_sources(korg_picoftheday PRIVATE
target_sources(picoftheday PRIVATE
configdialog.cpp
picoftheday.cpp
element.cpp
......@@ -9,17 +9,18 @@ target_sources(korg_picoftheday PRIVATE
picoftheday.h
element.h
)
ecm_qt_declare_logging_category(korg_picoftheday HEADER korganizer_picoftheday_plugin_debug.h IDENTIFIER KORGANIZERPICOFTHEDAYPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_picoftheday_plugins
ecm_qt_declare_logging_category(picoftheday HEADER korganizer_picoftheday_plugin_debug.h IDENTIFIER KORGANIZERPICOFTHEDAYPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_picoftheday_plugins
DESCRIPTION "kdepim-addons (korganizer picoftheday plugins)"
OLD_CATEGORY_NAMES log_korganizer_picoftheday_plugins
EXPORT KDEPIMADDONS
)
kcoreaddons_desktop_to_json(picoftheday picoftheday.desktop)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(korg_picoftheday PROPERTIES UNITY_BUILD ON)
set_target_properties(picoftheday PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(korg_picoftheday
target_link_libraries(picoftheday
PRIVATE
KF5::EventViews
KF5::KIOCore
......@@ -27,14 +28,6 @@ target_link_libraries(korg_picoftheday
)
install(TARGETS
korg_picoftheday
DESTINATION ${KDE_INSTALL_PLUGINDIR}
picoftheday
DESTINATION ${KDE_INSTALL_PLUGINDIR}/korganizer
)
########### install files ###############
install(FILES
picoftheday.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR}/korganizer
)
......@@ -21,7 +21,7 @@
#include <QCache>
#include <QGlobalStatic>
K_PLUGIN_FACTORY(PicofthedayFactory, registerPlugin<Picoftheday>();)
K_PLUGIN_CLASS_WITH_JSON(Picoftheday, "picoftheday.json")
// TODO: add also disc cache to avoid even more network traffic
using Cache = QCache<QDate, ElementData>;
......
......@@ -3,25 +3,19 @@
########### next target ###############
add_library(korg_thisdayinhistory MODULE)
target_sources(korg_thisdayinhistory PRIVATE
add_library(thisdayinhistory MODULE)
target_sources(thisdayinhistory PRIVATE
thisdayinhistory.cpp
thisdayinhistory.h
)
kcoreaddons_desktop_to_json(thisdayinhistory thisdayinhistory.desktop)
target_link_libraries(korg_thisdayinhistory
target_link_libraries(thisdayinhistory
KF5::EventViews
)
install(TARGETS
korg_thisdayinhistory
DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
########### install files ###############
install(FILES
thisdayinhistory.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR}/korganizer
thisdayinhistory
DESTINATION ${KDE_INSTALL_PLUGINDIR}/korganizer
)
......@@ -14,7 +14,7 @@
#include <KLocalizedString>
#include <KPluginFactory>
K_PLUGIN_FACTORY(ThisDayInHistoryFactory, registerPlugin<ThisDayInHistory>();)
K_PLUGIN_CLASS_WITH_JSON(ThisDayInHistory, "thisdayinhistory.json")
ThisDayInHistory::ThisDayInHistory(QObject *parent, const QVariantList &args)
: Decoration(parent, args)
......
Supports Markdown
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