-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
KDEConnectMacros.cmake
20 lines (17 loc) · 1.1 KB
/
KDEConnectMacros.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <[email protected]>
# Redistribution and use is allowed according to the terms of the BSD license.
# 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)
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})")
endfunction()
function(kdeconnect_add_kcm plugin)
kcoreaddons_add_plugin(${plugin} ${ARGN} INSTALL_NAMESPACE kdeconnect/kcms)
install(FILES "${plugin}.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
endfunction()