On 11/30/2012 11:58 AM, Stephen Kelly wrote: > add_library(picon STATIC libone.cpp) > add_library(picoff STATIC libtwo.cpp) > target_link_libraries(picoff LINK_INTERFACE_LIBRARIES picon) > > get_target_property(_res picoff LINK_INTERFACE_LIBRARIES) > message("PROP : ${_res}") > > outputs this with cmake 2.8.9: > > PROP : picon > > I don't know if that's a bug, or if you mean that the IMPORTED_ variant is > never defined by export() or install(EXPORT). I can confirm that the > property contents are not exported for static libraries.
Correct. The property may get set but it is simply ignored. For the tll() way of setting it I didn't explicitly exclude STATIC libraries because I wanted to document the behavior of that mode simply as setting the property. >> Somehow the "link implementation" must be turned into >> IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG> and/or the new >> INTERFACE_LINK_LIBRARIES when exporting targets. > > add_library(picon STATIC libone.cpp) > add_library(picoff STATIC libtwo.cpp) > target_link_libraries(picoff picon) > > causes the IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG> of the IMPORTED picoff > to contain picon with CMake 2.8.9, because > cmExportFileGenerator::SetImportDetailProperties populates that with the > link implementation in the case of static libraries. Right. The tll() call specifies the "link implementation" which then *becomes* the link interface when exported. -Brad -- 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