2013-05-03 03:16:07 +02:00
|
|
|
|
2016-08-31 01:43:15 +02:00
|
|
|
find_package(ECM 1.6.0 CONFIG REQUIRED)
|
2017-04-28 12:44:40 +02:00
|
|
|
include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake)
|
2013-05-03 03:16:07 +02:00
|
|
|
|
2014-04-27 17:14:22 +02:00
|
|
|
set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma")
|
2016-08-31 01:43:15 +02:00
|
|
|
set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}")
|
2013-08-13 01:15:36 +02:00
|
|
|
|
2013-08-13 01:25:58 +02:00
|
|
|
# plasma_install_package(path componentname [root] [type])
|
2013-08-13 01:15:36 +02:00
|
|
|
#
|
2018-03-20 16:52:18 +01:00
|
|
|
# Use plasma_install_bundled_package instead.
|
2013-08-13 01:15:36 +02:00
|
|
|
# Installs a Plasma package to the system path
|
|
|
|
# @arg path The source path to install from, location of metadata.desktop
|
|
|
|
# @arg componentname The plugin name of the component, corresponding to the
|
|
|
|
# X-KDE-PluginInfo-Name key in metadata.desktop
|
2014-04-27 17:14:22 +02:00
|
|
|
# @arg root The subdirectory to install to, default: plasmoids
|
2013-08-13 01:25:58 +02:00
|
|
|
# @arg type The type, default to applet, or applet, package, containment,
|
|
|
|
# wallpaper, shell, lookandfeel, etc.
|
2017-01-17 14:28:42 +01:00
|
|
|
# @see Types column in kpackagetool5 --list-types
|
2013-08-13 01:25:58 +02:00
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
# plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet
|
2014-04-27 17:14:22 +02:00
|
|
|
# plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
|
2013-08-13 01:15:36 +02:00
|
|
|
#
|
2013-08-13 01:01:39 +02:00
|
|
|
macro(plasma_install_package dir component)
|
2013-05-03 03:16:07 +02:00
|
|
|
set(root ${ARGV2})
|
|
|
|
set(type ${ARGV3})
|
|
|
|
if(NOT root)
|
2014-04-27 17:14:22 +02:00
|
|
|
set(root plasmoids)
|
2013-05-03 03:16:07 +02:00
|
|
|
endif()
|
|
|
|
if(NOT type)
|
|
|
|
set(type applet)
|
|
|
|
endif()
|
2014-06-12 16:42:09 +02:00
|
|
|
|
2018-03-20 16:52:18 +01:00
|
|
|
kpackage_install_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR} NO_DEPRECATED_WARNING)
|
|
|
|
|
|
|
|
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
|
|
|
|
endmacro()
|
|
|
|
|
2018-03-20 14:54:42 +01:00
|
|
|
|
2018-03-20 16:52:18 +01:00
|
|
|
# plasma_install_bundled_package(path componentname [root] [type])
|
|
|
|
#
|
|
|
|
# Installs a Plasma package to the system path,
|
|
|
|
# compressing all its files in a binary rcc qresources file.
|
|
|
|
# @arg path The source path to install from, location of metadata.desktop
|
|
|
|
# @arg componentname The plugin name of the component, corresponding to the
|
|
|
|
# X-KDE-PluginInfo-Name key in metadata.desktop
|
|
|
|
# @arg root The subdirectory to install to, default: plasmoids
|
|
|
|
# @arg type The type, default to applet, or applet, package, containment,
|
|
|
|
# wallpaper, shell, lookandfeel, etc.
|
|
|
|
# @see Types column in kpackagetool5 --list-types
|
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
# plasma_install_bundled_package(mywidget org.kde.plasma.mywidget) # installs an applet
|
|
|
|
# plasma_install_bundled_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
|
|
|
|
#
|
|
|
|
macro(plasma_install_bundled_package dir component)
|
|
|
|
set(root ${ARGV2})
|
|
|
|
set(type ${ARGV3})
|
|
|
|
if(NOT root)
|
|
|
|
set(root plasmoids)
|
|
|
|
endif()
|
|
|
|
if(NOT type)
|
|
|
|
set(type applet)
|
2018-03-20 14:54:42 +01:00
|
|
|
endif()
|
|
|
|
|
2018-03-20 16:52:18 +01:00
|
|
|
kpackage_install_bundled_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR})
|
|
|
|
|
2016-08-31 01:43:15 +02:00
|
|
|
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
|
2013-05-03 03:16:07 +02:00
|
|
|
endmacro()
|
|
|
|
|
2013-08-13 01:15:36 +02:00
|
|
|
|
|
|
|
# plasma_add_plugin(pluginname sources_SRC)
|
|
|
|
#
|
|
|
|
# Use instead of add_library. Replacement for kde4_add_plugin
|
|
|
|
# Basically does add_library and removes the prefix of the library
|
|
|
|
#
|
|
|
|
# @arg pluginname The name of the plugin,
|
2013-08-13 01:25:58 +02:00
|
|
|
# @arg sources_SRC The source files to be built
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# plasma_add_plugin(plasma_engine_statusnotifieritem ${statusnotifieritem_engine_SRCS})
|
2013-08-13 01:15:36 +02:00
|
|
|
#
|
2013-08-09 02:40:49 +02:00
|
|
|
macro(plasma_add_plugin plugin)
|
2013-11-14 17:42:26 +01:00
|
|
|
message(WARNING "plasma_add_plugin() is deprecated, use add_library(MODULE) instead. You can use the porting scripts in plasma-framework/tools")
|
2013-08-09 02:40:49 +02:00
|
|
|
set(plugin_sources ${ARGN} )
|
|
|
|
add_library(${plugin} MODULE ${plugin_sources} )
|
|
|
|
set_target_properties(${plugin} PROPERTIES PREFIX "")
|
|
|
|
endmacro()
|
|
|
|
|