Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
On 06/07/2011 09:13 PM, Bjørn Forsman wrote: > 2011/6/7 Michael Wild : >> If the FindXXX.cmake file called add_definitions(), >> include_directories() et al., that could be potentially harmful. Some >> sources might required that some define is not set, or a wrong header >> file might be #include'e

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
On 06/07/2011 06:58 PM, Michael Wild wrote: > On 06/07/2011 06:23 PM, Bjørn Forsman wrote: >> 2011/6/7 Michael Wild : >>> On 06/07/2011 03:38 PM, Bjørn Forsman wrote: Why not put find_package(Qt4) in the sub directories where it is actually used? >>> >>> And if it is used in multiple sub

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
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? Yes,

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
2011/6/7 Michael Wild : > If the FindXXX.cmake file called add_definitions(), > include_directories() et al., that could be potentially harmful. Some > sources might required that some define is not set, or a wrong header > file might be #include'ed (thing of all the different X.h that exist). > Fi

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Marcus D. Hanwell
2011/6/7 Michael Wild : > On 06/07/2011 06:23 PM, Bjørn Forsman wrote: >> 2011/6/7 Michael Wild : >>> On 06/07/2011 03:38 PM, Bjørn Forsman wrote: Why not put find_package(Qt4) in the sub directories where it is actually used? >>> >>> And if it is used in multiple subdirectories? >> >> W

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
On 06/07/2011 06:23 PM, Bjørn Forsman wrote: > 2011/6/7 Michael Wild : >> On 06/07/2011 03:38 PM, Bjørn Forsman wrote: >>> Why not put find_package(Qt4) in the sub directories where it is actually >>> used? >> >> And if it is used in multiple subdirectories? > > What's bad about that? (Sorry, I r

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
On 7 June 2011 16:32, Rolf Eike Beer 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? >

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
2011/6/7 Michael Wild : >On 06/07/2011 03:38 PM, Bjørn Forsman wrote: >> Why not put find_package(Qt4) in the sub directories where it is actually >> used? > > And if it is used in multiple subdirectories? What's bad about that? (Sorry, I really don't know). > FindXXX.cmake modules should only d

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Rolf Eike Beer
> 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? Besides the points already given here is another ex

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
On 06/07/2011 04:11 PM, Marcus D. Hanwell wrote: > On Tue, Jun 7, 2011 at 9:46 AM, Michael Wild wrote: >> 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_pac

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Marcus D. Hanwell
On Tue, Jun 7, 2011 at 9:46 AM, Michael Wild wrote: > 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 the

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
On 06/07/2011 03:47 PM, Bjørn Forsman wrote: > On 7 June 2011 15:21, 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

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
On 06/07/2011 03:38 PM, Bjørn Forsman wrote: > Thanks for a quick reply! > > On 7 June 2011 14:52, Michael Wild 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 FindQ

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
On 7 June 2011 15:21, 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, w

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
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,

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
Thanks for a quick reply! On 7 June 2011 14:52, Michael Wild 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 ther

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread John Drescher
> 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 doin

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Michael Wild
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? > > B

[CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-07 Thread Bjørn Forsman
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 __