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::QtCore reference and
> others from your GrantleeTargets-debug.
> 
>> 
>> > The GrantleeConfig.cmake could set QT_USE_IMPORTED_TARGETS and a
>> > find_package(Qt4) to recreated those imported targets.
>> 
>> Ok, so maybe setting cis the thing that needs to
>> be done 'again' by project B?
> 
> Yes, or preferably in your GrantleeConfig.cmake so project B doesn't have
> to do it.
> 

I tried creating the error scenario, but it does work even if the downstream 
does not set QT_USE_IMPORTED_TARGETS and even if I don't put it in 
GrantleeConfig either. Qt4::QtCore is never interpreted as a file path 
because FindQt4.cmake sets it unconditionally, and only conditionally sets 
QT_QTCORE_LIBRARY to Qt4::QtCore based on QT_USE_IMPORTED_TARGETS.

That means that if Grantlee uses 


_______________________________________________
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

Reply via email to