[CMake] FindQt4.cmake to automatically include QT_USE_FILE?

Bjørn Forsman bjorn.forsman at gmail.com
Tue Jun 7 09:47:23 EDT 2011


On 7 June 2011 15:21, John Drescher <drescherjm at gmail.com> 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.

Isn't it be possible to call find_package(Qt4) only in sub-projects that use Qt?

(Note to self: read up on cmake find_package() and scoping...)

Best regards,
Bjørn Forsman


More information about the CMake mailing list