[CMake] library dependencies

Jesper Eskilson jesper at eskilson.se
Mon Jul 2 18:32:42 EDT 2007


2007/7/2, Alexander Neundorf <a.neundorf-work at gmx.net>:
> On Monday 02 July 2007 08:05, Jesper Eskilson wrote:
> > Hi all,
> >
> > Is there a way to extract the list of library dependencies specified
> > by target_link_libraries for a target? I would like to be able to pass
> > the list of libraries  to an external script at build time.
>
> Does export_library_dependencies() help ? You could use it to put the
> information in a text file which could then be used at buildtime by other
> tools/scripts.

No; export_library_dependencies does not include link dependencies for
executables.

I've solved it by wrapping target_link_libraries in a macro, and
storing the dependencies in a variable which I can pass around as I
like.

-- 
/Jesper


More information about the CMake mailing list