[CMake] What is the preferred method of handling inter-library dependencies?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jul 13 16:41:39 EDT 2006


On 2006-07-13 14:35-0400 William A. Hoffman wrote:

> At 02:01 PM 7/13/2006, Alan W. Irwin wrote:
>> What are the preferred entries for TARGET_LINK_LIBRARIES?
>>
>> "Minimal dependencies", i.e.,
>> TARGET_LINK_LIBRARIES(x y)
>> TARGET_LINK_LIBRARIES(y z)
>> TARGET_LINK_LIBRARIES(z external1 external2)
>
> This should work fine in CMake.
> The libraries will be chained automatically.

Thanks, Bill, for your response.

How do I get access to the actual link flags used for the link command
generated by cmake (which presumably includes all the appropriate -L and -l
flags to access lib[xyz] and libexternal[12] as well as platform-dependent
link flags).  I need those actual link flags to configure pkg-config files
that describe how external applications should link to libx, liby, and libz.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list