2

Using Qt 4.8.2.

When one uses the QtWebkit module in a cmake project, it seems to uselessly link with the QtXmlPatterns library. The offending line is /usr/share/cmake-2.8/Modules/UseQt4.cmake:70, which reads:

SET(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)

However, the webkit library does not seem to depend on the xmlpatterns library:

objdump -p /usr/lib/i386-linux-gnu/libQtWebKit.so | grep NEEDED
  NEEDED               libsqlite3.so.0
  NEEDED               libXrender.so.1
  NEEDED               libgstapp-0.10.so.0
  NEEDED               libgstinterfaces-0.10.so.0
  NEEDED               libgstpbutils-0.10.so.0
  NEEDED               libgstvideo-0.10.so.0
  NEEDED               libgstbase-0.10.so.0
  NEEDED               libgstreamer-0.10.so.0
  NEEDED               libgobject-2.0.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libQtGui.so.4
  NEEDED               libQtNetwork.so.4
  NEEDED               libQtCore.so.4
  NEEDED               libpthread.so.0
  NEEDED               libX11.so.6
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6

(In fact, you should notice that it depends on the QtNetwork library, which is not listed in UseQt4.cmake:70.) This causes my application to have a useless link to QtXmlPatterns. Is this a bug in UseQt4.cmake, or what am I missing?

4

0 回答 0