[CMake] FindQt4.cmake to automatically include QT_USE_FILE?

Michael Wild themiwi at gmail.com
Tue Jun 7 08:52:19 EDT 2011


On 06/07/2011 02:20 PM, Bjørn Forsman wrote:
> Hi all,
> 
> As far as I can tell, all Qt programs built with CMake must include
> QT_USE_FILE after find_package(). So why doesn't FindQt4.cmake simply
> include QT_USE_FILE itself? Is there maybe a use case where
> QT_USE_FILE is *not* wanted?
> 
> Best regards,
> Bjørn Forsman

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.

Michael


More information about the CMake mailing list