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

Alexander Neundorf neundorf at kde.org
Mon Jun 30 00:04:39 CEST 2008


On Sunday 29 June 2008, Modestas Vainius wrote:
> Hello,
>
> Ok, my comments about your reduced_linking_2.patch can be found below:

Thanks for reviewing :-)

> > khtml
> > LINK_INTERFACE_LIBRARIES "kparts;kjs;kio;kdeui;kdecore"
>
> Please drop kjs. It is definitely excess here because none of our
> target_link_libraries fixes has ever included it.

Ok.

> > krosscore
> > LINK_INTERFACE_LIBRARIES "kdecore;${QT_QTSCRIPT_LIBRARY};
>
> {QT_QTXML_LIBRARY}")
> krosscore public headers do not include any KDE specific headers. Replace
> kdecore with QtCore. 

Ok.

> 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).

> > krossui
> > LINK_INTERFACE_LIBRARIES "krosscore
>
> In addition, you probably want to add QtGui here.

Ok.

> > 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.

> > 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.

> > 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.


> In addition, it is a good idea to set LINK_INTERFACE_LIBRARIES for:
>
> kdnssd -> ${QT_QTCORE_LIBRARY}
> ktexteditor -> kdeui;kparts
> kdesu -> ${QT_QTCORE_LIBRARY}
> knewstuff2 -> ${QT_QTCORE_LIBRARY}
> knotifyconfig  -> ${QT_QTCORE_LIBRARY};${QT_QTGUI_LIBRARY}
> kpty -> kdecore
> kutils -> kdeui
> solid -> ${QT_QTCORE_LIBRARY}
> ${KJSEMBEDLIBNAME} -> "${KJSLIBNAME};${QT_QTCORE_LIBRARY}
>
> I can prepare a patch with all these changes if you agree with them.

Yes, please.
Dirk, comments ?

Alex



More information about the Kde-buildsystem mailing list