Why does FindQt4.cmake add a link dependency of QtScript to QtUiTools?

Richard Dale richard_dale at tipitina.demon.co.uk
Wed Jun 20 17:50:04 BST 2007


On Wednesday 20 June 2007, Thiago Macieira wrote:
> Richard Dale wrote:
> >I found my library had an unexpected link dependency on QtScript even
> > though there was no mention of QtScript in the CMakeLists.txt file.
> > After investigating a bit I found these lines in FindQt.cmake:
> >
> >  IF(QT_QTSCRIPT_LIBRARY AND QT_QTUITOOLS_LIBRARY)
> >    SET(QT_QTUITOOLS_LIBRARY ${QT_QTUITOOLS_LIBRARY}
> > ${QT_QTSCRIPT_LIBRARY} ) ENDIF(QT_QTSCRIPT_LIBRARY AND
> > QT_QTUITOOLS_LIBRARY)
> >
> >WTF? I've no idea what problem this is trying to solve as there is no
> > comment against it. But it just seems plain wrong to me and should be
> > removed.
>
> Unfortunately, it's required. QtUiTools depends on QtScript. It's an
> indirect dependency.
>
> However, QtUiTools is a static library. That means it's up to the final
> applications to link to all of its dependencies. Hence, the line above.
>
> In other words: your code *does* require QtScript.
Oh, yes thanks you're right. In order to use just the QUiLoader class I need 
to link against both QtDesigner and the QtScript libs.

-- Richard






More information about the kde-core-devel mailing list