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

Thiago Macieira thiago at kde.org
Wed Jun 20 17:15:03 BST 2007


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.

-- 
  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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070620/c9178dca/attachment.sig>


More information about the kde-core-devel mailing list