Hum, let's try again. I'd like to know if there is an API to query properties of 'mylib-targets' as in:
add_library(mylib SHARED mylib.c mylib.h) add_library(mylib2 SHARED mylib.c mylib.h) install(TARGETS mylib mylib2 DESTINATION lib/myproj EXPORT mylib-targets) install(EXPORT mylib-targets DESTINATION lib/myproj) get_???_property(my_targets mylib-targets TARGETS) I'd like to list all TARGETS associated with mylib-targets. This will greatly ease generating a UseProject.cmake file. Thanks On Fri, Oct 23, 2009 at 4:28 PM, Mathieu Malaterre <mathieu.malate...@gmail.com> wrote: > Hi there, > > I am still working on Packaging and Exporting: > http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting > > I'd like to know if there is a neat function to loop over all > libraries that are imported (typically for a Use*.cmake file). > > Eg. > > add_library(mylib SHARED mylib.c mylib.h) > add_library(mylib2 SHARED mylib.c mylib.h) > install(TARGETS mylib mylib2 DESTINATION lib/myproj EXPORT mylib-targets) > install(EXPORT mylib-targets DESTINATION lib/myproj) > > Creates a mylib-targets.cmake: > ... > ADD_LIBRARY(mylib SHARED IMPORTED) > ADD_LIBRARY(mylib2 SHARED IMPORTED) > ... > > > is there a way to retrieve those imported libraries in a variable > called -say- "mylib_LIBRARIES", or do I have to construct this > variable myself ? > > Thanks ! > -- > Mathieu > -- Mathieu _______________________________________________ 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