2020-08-17 10:48:10 +01:00
|
|
|
# SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
|
2015-03-19 15:36:53 +00:00
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
|
2023-08-06 11:00:02 +01:00
|
|
|
# Function to create the plugin and generate a logging category for it
|
|
|
|
function(kdeconnect_add_plugin plugin_name)
|
|
|
|
kcoreaddons_add_plugin(${plugin_name} ${ARGN} INSTALL_NAMESPACE kdeconnect)
|
2015-03-19 15:36:53 +00:00
|
|
|
|
2023-08-06 11:00:02 +01:00
|
|
|
string(REPLACE "kdeconnect_" "" PlUGIN_WITHOUT_PREFIX "${plugin_name}") # For the file name and description, we don't want this
|
|
|
|
string(TOUPPER "${PlUGIN_WITHOUT_PREFIX}" PLUGIN_UPPER) # The identifier is all capy
|
|
|
|
ecm_qt_declare_logging_category(${plugin_name}
|
|
|
|
HEADER plugin_${PlUGIN_WITHOUT_PREFIX}_debug.h
|
|
|
|
IDENTIFIER KDECONNECT_PLUGIN_${PLUGIN_UPPER} CATEGORY_NAME kdeconnect.plugin.${PlUGIN_WITHOUT_PREFIX}
|
|
|
|
DEFAULT_SEVERITY Warning
|
|
|
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ${PlUGIN_WITHOUT_PREFIX})")
|
2023-08-06 10:46:20 +01:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(kdeconnect_add_kcm plugin)
|
|
|
|
kcoreaddons_add_plugin(${plugin} ${ARGN} INSTALL_NAMESPACE kdeconnect/kcms)
|
|
|
|
install(FILES "${plugin}.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
|
2023-07-18 21:13:27 +01:00
|
|
|
endfunction()
|