2013-05-03 03:16:07 +02:00
|
|
|
|
|
|
|
find_package(KF5 MODULE REQUIRED COMPONENTS InstallDirs)
|
|
|
|
|
2013-08-13 01:15:36 +02:00
|
|
|
|
|
|
|
# plasma_install_package(path componentname)
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
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)
|
|
|
|
set(root plasma/plasmoids)
|
|
|
|
endif()
|
|
|
|
if(NOT type)
|
|
|
|
set(type applet)
|
|
|
|
endif()
|
|
|
|
install(DIRECTORY ${dir}/ DESTINATION ${DATA_INSTALL_DIR}/${root}/${component} PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE)
|
|
|
|
install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-${type}-${component}.desktop)
|
|
|
|
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,
|
|
|
|
# @arg componentname The source files to be built
|
|
|
|
#
|
2013-08-09 02:40:49 +02:00
|
|
|
macro(plasma_add_plugin plugin)
|
|
|
|
set(plugin_sources ${ARGN} )
|
|
|
|
add_library(${plugin} MODULE ${plugin_sources} )
|
|
|
|
set_target_properties(${plugin} PROPERTIES PREFIX "")
|
|
|
|
endmacro()
|
|
|
|
|