[PATCH weston sdk v2 1/8] weston.pc: Add dependencies for pixman-1 and xkbcommon

Thiago Macieira thiago.macieira at intel.com
Fri Jul 5 10:35:20 PDT 2013

On sexta-feira, 5 de julho de 2013 09.26.23, Pekka Paalanen wrote:
> The color management modules are an example of a weston module, that
> does not need pixman at all. If you grep through src/cms*.[ch], there
> is not a single mention of "pixman". Why do these modules, if they were
> external, need to link directly to pixman then?

That's a very good example.

I had written:
If the CMS module compiles without the -I flags, then we shouldn't have pixman 
listed in Requires. If it requires the -I flags, then it needs to publicly 
depend on pixman, whether it actually uses anything from it or not.

The edge scenario is when some headers in weston trigger the dependency on 
pixman and some don't. Then it becomes a subjective call: is the dependency 
big enough to warrant the public dependency? Is it likely to grow?

Then I actually tested pkg-config. Turns out that Requires.private behaves 
slightly different from Libs.private. The docs are a bit cryptic:

              A list of packages required by this package. The difference from
              Requires  is that the packages listed under Requires.private are
              not taken into account when a flag list is computed for  dynami‐
              cally linked executable (i.e., when --static was not specified).
              In the situation where each .pc file corresponds to  a  library,
              Requires.private shall be used exclusively to specify the depen‐
              dencies between the libraries.

First, it mentions that Requires.private is *not* used in dynamic linking. 
Then it changes its mind with that last sentence, which is cryptic.

In any case, the actual behaviour is that Requires.private is used in dynamic 
linking. It adds -I flags, but no -L or -l flags.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130705/e7b361df/attachment.pgp>

More information about the wayland-devel mailing list