[CMake] FindQt4.cmake to automatically include QT_USE_FILE?
Michael Wild
themiwi at gmail.com
Tue Jun 7 09:53:23 EDT 2011
On 06/07/2011 03:47 PM, Bjørn Forsman wrote:
> 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
Also read http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt.
Michael
More information about the CMake
mailing list