add_library NO_PREFIX

David Faure faure at kde.org
Thu Nov 29 08:28:58 UTC 2012


On Thursday 29 November 2012 09:08:05 Alexander Neundorf wrote:
> In KDE4 we do it this way because we did it this way in KDE3. ;-)
> Personally I don't care much whether plugins have a "lib" prefix or not. Not
> having the "lib" prefix can be interpreted as a hint that this file is not
> a normal shared library.
> Technically it shouldn't matter I think.

It's more than a hint, it's a strong guarantee, that nobody will ever succeed 
in linking to a plugin as if it was a shared lib. That's non portable, bad 
practice, bad design.

> I just had a look at the gimp plugin dir, those seem to be executables (no
> prefix, no suffix, and they say "compose is a GIMP plug-in and must be run
> by GIMP to be used" when executed.

Unusual :)

At least that makes the lookup cross-platform, without having to mess with 
extensions.

> The following packages installed on my system use plugins without "lib"
> prefix: ghostscript, audacious, slang, zsh, gegl, gconv, egl, pango.
> 
> The only plugins I found which clearly seemed to be plugins and not shared
> libs which have the "lib" prefix are from CodeBlocks.
> 
> So at least it seems to be quite common to have no prefix for plugins.

Right.

Qt is the exception there, it uses a lib prefix, but IMHO that's a bug, for the 
above reason. One day it will switch to cmake and lose the lib prefix :-) Haha.

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



More information about the Kde-frameworks-devel mailing list