WITH_PREFIX for kdemodules?

Alexander Neundorf neundorf at kde.org
Mon Oct 29 12:20:54 GMT 2007


On Monday 29 October 2007, Jaroslaw Staniek wrote:
> Hello
> Is there a technical reason (e.g. some tools expect this) to use 'lib'
> prefix for kde plugins?

The reason this option is there is that for KDE 3 some plugins had the prefix, 
others didn't. I don't know if there were technical reasons in KDE3 for that.

> Libs are linked this way if WITH_PREFIX is present in CMakeFile.txt, eg.
>
> kde4_add_plugin(karbonepsexport WITH_PREFIX ${karbonepsexport_PART_SRCS})
>
> Klibloader has problems with this on Windows, and some plugins use lib
> prefix, some do not.
> kdecore/utils/ code is unnecessary complicated (there are 3 copies of the
> same code for removing "lib" prefix) because of the problem, while in the
> same time we have the following warning, that's reasonable for me at the
> moment:
>
>     if (hasPrefix)
>         kDebug(150) << "plugins shouldn't have a 'lib' suffix:" << libname;
>
> -in QString findLibraryInternal(const QString &name, const
> KComponentData &cData)
>
> And now:
> 1. I have improved the code containing these 3 copies.
>
> 2. Is it a good idea to refuse loading of plugins with lib prefix, and/or
> remove support for WITH_PREFIX from kde4_add_plugin()?

If we remove it, I'll add a warning (or error ?) if it is used nevertheless, 
so people will notice.

Alex




More information about the kde-core-devel mailing list