Hi,

As I wrote in 

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7082
 (Linking to OBJECT libraries?, 2013-06-06)

I was experimenting with adding a static library to the INTERFACE of the 
Qt5::Gui target. While that seemed to work, the target build order is not 
correctly accounted for.

For example:

 add_library(some_imported SHARED IMPORTED)
 # ...
 add_library(foo dummy.cpp)

 set_property(TARGET some_imported APPEND PROPERTY 
   LINK_INTERFACE_LIBRARIES foo
  )

 add_executable(my_exe ...)
 target_link_libraries(my_exe some_imported)

The my_exe target does not currently get a target-build-order dependency on 
foo as a result of the above. Is that a feature (you can't add non-IMPORTED 
targets to the INTERFACE of IMPORTED targets), or a bug (we should fix it)?

Fixing it is quite easy I think. All non-IMPORTED targets from the INTERFACE 
of IMPORTED targets in the link implementation simply get appended to the 
result in GetDirectLinkLibraries.

Thanks,

Steve.


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to