[cmake-developers] When should a library be in LINK_INTERFACE_LIBRARIES?
Stephen Kelly
steveire at gmail.com
Fri Mar 23 09:15:24 EDT 2012
Hi there,
I'm trying to get the IMPORTED_LINK_INTERFACE_LIBRARIES for Qt modules
correct.
There is a debate over the QtQml module at the moment. It has in one of its
interface classes (QQmlEngine) a method QNetworkAccessManager
*networkAccessManager() const, and the QNetworkAccessManager class is
forward declared.
https://qt.gitorious.org/qt/qtdeclarative/blobs/master/src/qml/qml/qqmlengine.h
The QNetworkAccessManager class is in the QtNetwork module.
One can use the QQmlEngine class without linking to QtNetwork. It would only
be necessary to link to QtNetwork if the networkAccessManager() method is
called. Otherwise, it is overlinking.
So I'm looking for other opinions. Should the LINK_INTERFACE_LIBRARIES
contain all dependencies that could possibly be needed, or just the minimum
(if you don't use these libraries, you code won't work at all)?
Thanks,
Steve.
More information about the cmake-developers
mailing list