Reducing excess linkage - cmake 2.6 IMPORTED targets and LINK_INTERFACE_LIBRARIES for kdelibs

Thiago Macieira thiago at kde.org
Mon Jun 30 00:45:28 CEST 2008


Alexander Neundorf wrote:
>> The only QtXml user is kross/core/action.h
>> fromDomElement/toDomElement. I don't think this is enough to link all
>> krosscore users against QtXml.
>
>Hmm, is it a real problem if QtXml is listed here ? It shouldn't add
> more package dependencies (QtXml should be installed anyways when KDE4
> is installed).

That's not the point.

The point is that most applications won't be using QtXml symbols, so they 
shouldn't be linking *directly* to QtXml. If they do use them, then they 
should link.

>> > kio
>> > LINK_INTERFACE_LIBRARIES "kdeui;kdecore;${QT_QTNETWORK_LIBRARY};
>>
>> ${QT_QTXML_LIBRARY}"
>> Could you please justify QtNetwork and QtXml here? None of public kio
>> headers need QtNetwork (actually, QtNetwork is not worth bundling with
>> anything). QtXml users are kbookmark*.h (internal method) and
>> davjob.h. In my opinion, they are not good enough reason to pull
>> QtXml. Application can specify it manually. However, it is true that
>> there will be relatively many linking failures due to missing QtXml.
>
>That's the justification. Avoiding too much breakage.

I don't agree. If we do this at all, we should do the proper cleanup. If 
the application doesn't use QtDBus directly, they shouldn't link to 
QtDBus directly.

Every application and library has to explicitly list all of its direct 
dependencies and only the direct ones. Anything else is an error.

This interface stuff is just a convenience.

>> > kdeui
>> > LINK_INTERFACE_LIBRARIES
>> > "kdecore;${QT_QTSVG_LIBRARY};${QT_QTGUI_LIBRARY}"
>>
>> It is true that kdeui exposes QtSvg, but kdeui is used extensively in
>> KDE (directly and via kio and its dependencies). QtSvg is needed used
>> by ~13 targets in official KDE modules whereas kdeui is probably
>> needed by ~90% of all KDE applications. Hence, I don't think it is
>> worth to have in kdeui interface libraries.
>
>Hmm, see above. Is it a real problemm if it is listed ?
>I don't have a strong opinion about it, but I'd like to keep breakage
> low.

I think we should break now, before the problem is too widespread.

>> > kdecore
>> >  LINK_INTERFACE_LIBRARIES
>> > "${QT_QTDBUS_LIBRARY};${QT_QTCORE_LIBRARY}")
>>
>> It is true that kdecore/util/klauncher_iface.h exposes QtDBus
>> interface. But the need for it rarely comes from klauncher_iface
>> users. It is true, that QtDBus is needed by ~40% KDE applications
>> (libraries, kioslaves and other stuff usually don't need it) so you
>> would get a lot of linking failures due to QtDBus.
>
>That's why I'd really like to have it here.

See above.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080629/1c308b48/attachment.pgp 


More information about the Kde-buildsystem mailing list