kde4_add_plugin on KF5

Sebastian Kügler sebas at kde.org
Thu Sep 19 16:15:28 UTC 2013


On Thursday, September 19, 2013 18:00:41 Aleix Pol wrote:
> Hi,
> We should decide what we do with the add_plugin macro. Should I install it
> as kf5_add_plugin from KCoreAddons? Do we want something different or
> better?

This is what we're using in Plasma (PlasmaMacros.cmake):

# 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 sources_SRC The source files to be built
#
# Example:
# plasma_add_plugin(plasma_engine_statusnotifieritem 
${statusnotifieritem_engine_SRCS})
#
macro(plasma_add_plugin plugin)
    set(plugin_sources ${ARGN} )
    add_library(${plugin} MODULE ${plugin_sources} )
    set_target_properties(${plugin} PROPERTIES PREFIX "")
endmacro()


I would not mind having that available somewhere else.

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Kde-frameworks-devel mailing list