The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15299 
====================================================================== 
Reported By:                Paweł Stankowski
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15299
Category:                   Modules
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-12-11 06:36 EST
Last Modified:              2014-12-11 06:36 EST
====================================================================== 
Summary:                    CMakeExpandImportedTargets does not support
generator expression TARGET_PROPERTY w/o target specified
Description: 
CMakeExpandImportedTarget expands target names to file paths including targets
from IMPORTED_LINK_INTERFACE_LIBRARIES* properties of expanded targets.

However, IMPORTED_LINK_INTERFACE_LIBRARIES property may contain generator
expression $<TARGET_PROPERTY:prop>. It should be converted to
$<TARGET_PROPERTY:target,prop> expression. Otherwise following error will
appear:

"$<TARGET_PROPERTY:prop> may only be used with targets.  It may not be used
  with add_custom_command.  Specify the target to read a property from using
  the $<TARGET_PROPERTY:tgt,prop> signature instead".

BTW: INTERFACE_LINK_LIBRARIES property should be preferred,
IMPORTED_LINK_INTERFACE_LIBRARIES should not be used when the former is defined.
Currently INTERFACE_LINK_LIBRARIES property is ignored.

Steps to Reproduce: 
This is easily reproducible on Windows with Qt libraries.

For example, Qt5 adds following generator expression in
IMPORTED_LINK_INTERFACE_LIBRARIES of Qt targets:
$<$<AND:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>,$<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>,$<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>,$<TARGET_POLICY:CMP0020>>:Qt5::WinMain>;C:/Qt5/5.3/msvc2013_opengl/bin/Qt5Networkd.dll;C:/Qt5/5.3/msvc2013_opengl/bin/Qt5Cored.dll;$<$<AND:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>,$<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>,$<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>,$<TARGET_POLICY:CMP0020>>:Qt5::WinMain>

Qt4 does similar thing.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-12-11 06:36 Paweł StankowskiNew Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to