<div class="gmail_quote">On Wed, Feb 11, 2009 at 8:54 AM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Philip Lowman wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Feb 10, 2009 at 1:01 PM, Brad King <<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a> CMake 2.6 makes it easy to export targets from one project (either its<div class="Ih2E3d">
<br>
build tree or install tree) for use by another project.<br>
<br>
Is this the easiest way to register dependencies of IMPORTED static libraries against each other? I'm just curious if there are plans to make target_link_libraries() work for this or is there a technical problem allowing it?<br>
</div></blockquote>
<br>
I do not plan to allow target_link_libraries for this. One must use<br>
IMPORTED_LINK_INTERFACE_LIBRARIES. However, it is easier than your<br>
example makes it because the property can name other imported targets:<div class="Ih2E3d"><br>
<br>
add_library(baz STATIC IMPORTED)<br>
set_target_properties(baz PROPERTIES<br></div><div class="Ih2E3d">
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a<br>
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)<br>
<br>
add_library(bar STATIC IMPORTED)<br>
set_target_properties(bar PROPERTIES<br></div><div class="Ih2E3d">
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a<br>
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a<br></div>
IMPORTED_LINK_INTERFACE_LIBRARIES baz) # <-- dependency is here</blockquote><div><br>Yes, thanks for pointing that out, that is much simpler.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Note if the outside project is also created by CMake, the install(EXPORT)<br>
feature can generate the proper import code for it.</blockquote><div> <br>Yes, I hope to play with that feature soon. Thanks.<br></div></div><br>-- <br>Philip Lowman<br>