Thanks for a quick reply! On 7 June 2011 14:52, Michael Wild <them...@gmail.com> wrote: > On 06/07/2011 02:20 PM, Bjørn Forsman wrote: >> 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? > > If you don't care for the macros and want to set up the > include-directories and defines yourself, no.
Ok, guess I haven't had any use for that so far. Examples of when it may be useful are welcome. But, wait...isn't that the whole point of find_package()? To set up variables containing necessary includes and libs? It seems FindWt4.cmake is special in this case, needing one extra step. > 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. Why not put find_package(Qt4) in the sub directories where it is actually used? Best regards, Bjørn Forsman _______________________________________________ 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