Commit dd8ebc83 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Install plugins into the right location

Use ksystemstats instead of ksysguard
parent 3980df0a
add_definitions(-DTRANSLATION_DOMAIN=\"ksysguard_plugins_global\")
set(KSYSTEMSTATS_PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/ksystemstats)
add_subdirectory(osinfo)
add_subdirectory(network)
add_subdirectory(power)
......
......@@ -13,4 +13,4 @@ if(SENSORS_FOUND)
target_compile_definitions(ksysguard_plugin_cpu PRIVATE HAVE_SENSORS)
endif()
install(TARGETS ksysguard_plugin_cpu DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_cpu DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
......@@ -6,4 +6,4 @@ if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(ksysguard_plugin_disk geom devstat)
endif()
install(TARGETS ksysguard_plugin_disk DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_disk DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
......@@ -12,4 +12,4 @@ set(KSYSGUARD_GPU_PLUGIN_SOURCES
add_library(ksysguard_plugin_gpu MODULE ${KSYSGUARD_GPU_PLUGIN_SOURCES})
target_link_libraries(ksysguard_plugin_gpu Qt::Core KF5::CoreAddons KF5::I18n KSysGuard::SystemStats UDev::UDev)
install(TARGETS ksysguard_plugin_gpu DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_gpu DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
......@@ -10,5 +10,5 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(ksysguard_plugin_memory Qt::Core KF5::CoreAddons KF5::I18n KSysGuard::SystemStats)
install(TARGETS ksysguard_plugin_memory DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_memory DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
endif()
......@@ -22,4 +22,4 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_include_directories(ksysguard_globalplugin_network PRIVATE ${NL_INCLUDE_DIRS})
endif()
install(TARGETS ksysguard_globalplugin_network DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_globalplugin_network DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
......@@ -5,4 +5,4 @@ set(KSYSGUARD_OSINFO_PLUGIN_SOURCES
add_library(ksysguard_plugin_osinfo MODULE ${KSYSGUARD_OSINFO_PLUGIN_SOURCES})
target_link_libraries(ksysguard_plugin_osinfo Qt::Core Qt::Gui Qt::DBus KF5::CoreAddons KF5::I18n KSysGuard::SystemStats)
install(TARGETS ksysguard_plugin_osinfo DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_osinfo DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
add_library(ksysguard_plugin_power MODULE power.cpp)
target_link_libraries(ksysguard_plugin_power KF5::CoreAddons KF5::I18n KF5::Solid KSysGuard::SystemStats)
install(TARGETS ksysguard_plugin_power DESTINATION ${KDE_INSTALL_PLUGINDIR}/ksysguard)
install(TARGETS ksysguard_plugin_power DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
......@@ -93,7 +93,7 @@ void KSysGuardDaemon::loadProviders()
std::for_each(m_providers.cbegin(), m_providers.cend(), [&knownPlugins] (const KSysGuard::SensorPlugin *plugin) {
knownPlugins.insert(plugin->providerName());
});
const auto plugins = KPluginLoader::instantiatePlugins(QStringLiteral("ksysguard"), [this, &knownPlugins](const KPluginMetaData &metaData) {
const auto plugins = KPluginLoader::instantiatePlugins(QStringLiteral("ksystemstats"), [this, &knownPlugins](const KPluginMetaData &metaData) {
auto providerName = metaData.rawData().value("providerName").toString();
if (knownPlugins.contains(providerName)) {
return false;
......
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