On 06/07/2011 03:21 PM, John Drescher wrote:
>> If you don't care for the macros and want to set up the
>> include-directories and defines yourself, no. Also, it is common to
>> find_package(Qt4) in the top-level CMakeLists.txt file, but then include
>> QT_USE_FILE only in specific subdirectories, where Qt is actually used.
>>
> 
> I have started doing that in my projects. It cuts down on the
> unnecessary includes for subprojects that do not need Qt.
> 
> John


Ah, this reminds me of one of the things on my wish list for FindQt4:
Modern Qt4 uses a Mac-framework compatible layout, such that in order to
e.g. include QObject header, you would do

#include <QtCore/QObject>

If a project is using this include-practice, the module could cut down
considerably on include-paths. Also, it makes the framework detection
ugliness on Mac unnecessary.

So, here my wish: similar to QT_USE_IMPORTED_TARGETS, introduce
QT_USE_FRAMEWORK_INCLUDES (or similar) which only adds the directory
containing all the QtCore, QtGui, QtXml, ... header directories to the
include-path.

Michael
_______________________________________________
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

Reply via email to