Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Stephen Kelly
Alexander Neundorf wrote: >> Is there some way I can modify that example to re-create the linker error >> described in the comment? > > Well, if simply the path is used, FindQt4.cmake does not have to be > executed before. > If imported targets are used, FindQt4.cmake has to be executed before (or

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Alexander Neundorf
On Wednesday 22 June 2011, Stephen Kelly wrote: > Hi Alex, thanks for the more detailed explanation. It is indeed more clear. > > However, I still don't think there is a linker error if I omit > QT_USE_IMPORTED_TARGETS from the config file. I tried to re-create the > error condition with a trivial

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Stephen Kelly
Clinton Stimpson wrote: > Yeah, I just looked again to verify what you are seeing... you don't need > to do this SET(QT_USE_IMPORTED_TARGETS 1) > in GrantleeConfig.cmake, but you can still do > find_package(Qt4 REQUIRED) > to create the imported targets. > > Clint Cool, I'll just do a find_packa

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Stephen Kelly
Hi Alex, thanks for the more detailed explanation. It is indeed more clear. However, I still don't think there is a linker error if I omit QT_USE_IMPORTED_TARGETS from the config file. I tried to re-create the error condition with a trivial project and could not re-create it. Alexander Neundor

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Alexander Neundorf
On Wednesday 22 June 2011, Stephen Kelly wrote: > Wups, sent a moment to early... > > Stephen Kelly wrote: > > Clinton Stimpson wrote: > >> It means the target must be created again with something like > >> add_library(Qt4::QtCore UNKNOWN IMPORTED) > >> > >> If GrantleeConfig.cmake were to do thi

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Clinton Stimpson
On Jun 22, 2011, at 7:01 AM, Stephen Kelly wrote: > Wups, sent a moment to early... > > Stephen Kelly wrote: > >> Clinton Stimpson wrote: >>> It means the target must be created again with something like >>> add_library(Qt4::QtCore UNKNOWN IMPORTED) >>> >>> If GrantleeConfig.cmake were to do t

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Stephen Kelly
Wups, sent a moment to early... Stephen Kelly wrote: > Clinton Stimpson wrote: >> It means the target must be created again with something like >> add_library(Qt4::QtCore UNKNOWN IMPORTED) >> >> If GrantleeConfig.cmake were to do this: >> SET(QT_USE_IMPORTED_TARGETS 1) >> find_package(Qt4 REQUIR

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-22 Thread Stephen Kelly
Clinton Stimpson wrote: > It means the target must be created again with something like > add_library(Qt4::QtCore UNKNOWN IMPORTED) > > If GrantleeConfig.cmake were to do this: > SET(QT_USE_IMPORTED_TARGETS 1) > find_package(Qt4 REQUIRED) > > then the imported targets would satisfy the Qt4::QtCor

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-21 Thread Clinton Stimpson
On Tuesday, June 21, 2011 06:59:25 am Stephen Kelly wrote: > Hi, > > Thanks for the response. I've got a few followups. > > Clinton Stimpson wrote: > >> The part that is not clear to me is this: > >> > This > >> > means when a project B then uses project A, these imported targets > >> > must be c

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-21 Thread Stephen Kelly
Hi, Thanks for the response. I've got a few followups. Clinton Stimpson wrote: >> The part that is not clear to me is this: >> > This >> > means when a project B then uses project A, these imported targets must >> > be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as >> > name

Re: [CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-20 Thread Clinton Stimpson
On Monday, June 20, 2011 04:09:00 pm Stephen Kelly wrote: > Hi, > > The FindQt4 module has this to say about QT_USE_IMPORTED_TARGETS: > > If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are > > set to point at these imported targets. This works better in general, and > > is a

[CMake] Where is QT_USE_IMPORTED_TARGETS not safe to use?

2011-06-20 Thread Stephen Kelly
Hi, The FindQt4 module has this to say about QT_USE_IMPORTED_TARGETS: > If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are > set to point at these imported targets. This works better in general, and > is also in almost all cases fully backward compatible. The only issue is