Re: kde4_add_plugin on KF5

2013-09-28 Thread David Faure
On Thursday 19 September 2013 19:39:54 Alexander Neundorf wrote:
 But I think Stephens plan is to get rid of those macros and use plain cmake 
 instead, i.e. add_library(... MODULE ...), as with add_executable() and
 add_library().

I've always been surprised that cmake doesn't remove the lib prefix when 
using MODULE. Starting plugins with lib encourages people to confuse libs 
and plugins, and to link to plugins -- which is a huge no no, with 
portability in mind.

The ideal solution IMHO would have been MODULE removing the prefix, but I 
guess it's too late for that.
So the second best solution IMHO would be a add_library( ... PLUGIN ...) or 
add_plugin(), in cmake itself.

This is definitely not kde specific.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: kde4_add_plugin on KF5

2013-09-19 Thread Aleix Pol
On Thu, Sep 19, 2013 at 6:15 PM, Sebastian Kügler se...@kde.org wrote:

 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
 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Well, I thought of something like that, but I checked and there are
projects using the different arguments that kde4_add_plugin has.
I don't see the point of oversimplifying there.

Aleix
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


kde4_add_plugin on KF5

2013-09-19 Thread Aleix Pol
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?

Aleix
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: kde4_add_plugin on KF5

2013-09-19 Thread Sebastian Kügler
On Thursday, September 19, 2013 18:26:54 Aleix Pol wrote:
 Well, I thought of something like that, but I checked and there are projects
 using the different arguments that kde4_add_plugin has. I don't see the
 point of oversimplifying there.

I didn't mean oversimplifying, but:

- to provide inspiration for what it should be / do
- to point out that I'd be happy to remove plasma_add_plugin in favor of
  another solution

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: kde4_add_plugin on KF5

2013-09-19 Thread Alexander Neundorf
On Thursday 19 September 2013, Alex Merry wrote:
 On 19/09/13 17:00, 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?
 
 Would e-c-m be the right place for it?

Depends on what it does.
IMO, if it is generally useful, and has no KDE dependencies, yes.
If it is only useful for KDE, it might go into kde-modules and get a KDEish 
prefix. But this is actually not wanted.

But I think Stephens plan is to get rid of those macros and use plain cmake 
instead, i.e. add_library(... MODULE ...), as with add_executable() and 
add_library().

Alex
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel