[CMake] transitive linking with separate projects

Alexander Dahl post at lespocky.de
Wed Mar 7 05:29:13 EST 2012


Hello Michael, 

Am 2012-03-06 16:46, schrieb Michael Hertling:
> or possibly better:
> 
> # libbar/bar-config.cmake.in:
> FIND_PACKAGE(FOO PATHS @FOO_DIR@ NO_DEFAULT_PATH)

I used

FIND_PACKAGE(FOO 0.1.0 REQUIRED)

in the package config file now, which works, too.

> BTW, find modules / config files should provide a *_LIBRARIES variable
> even if they use imported targets, e.g.: SET(FOO_LIBRARIES foo-shared)

I added this. Let me guess, this is for convenience with find rules
using the same variables?

> PS: The baz project on GitHub only contains a README.

I forgot to push this one.

Thanks very much, I guess this solves this kind of problem with my
packages. :-)

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***


More information about the CMake mailing list