Hi, The FindQt4 module has this to say about QT_USE_IMPORTED_TARGETS:
> If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are > set to point at these imported targets. This works better in general, and > is also in almost all cases fully backward compatible. The only issue is > when a project A which had this enabled then exports its libraries via > export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from > project A will depend on the imported Qt targets, and the names of these > imported targets will be stored in the dependency files on disk. The part that is not clear to me is this: > This > means when a project B then uses project A, these imported targets must be > created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of > a library file on disk, and not as a target, and linking will fail. What does it mean to say that the imported targets must be created again? Is it a source incompatibility? Does it mean that my downstreams have to use QT_USE_IMPORTED_TARGETS if I do? The KDE techbase page has additional caveats such as checking for file endings of the libraries etc I guess. I don't do such things in Grantlee, but if the use of QT_USE_IMPORTED_TARGETS affects downstreams too (as above) it might be relevant. http://techbase.kde.org/Development/CMake_KDE_4_4#FindQt4.cmake:_Imported_Targets_for_the_libraries Would using the variable have any real benefit? I have the following in my CMakeLists which I suspect may be removable if I use the variable: # http://mail.kde.org/pipermail/kde-windows/2007-December/001692.html # http://lists.trolltech.com/pipermail/qt-interest/2009-July/009829.html # qt is always compiled with QT_NO_DEBUG under mingw, # so we need to compile stuff linked against it # the same or otherwise QPluginLoader rejects plugins add_definitions(-DQT_NO_DEBUG) Thanks, Steve. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
