[PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
Quentin Glidic
sardemff7+wayland at sardemff7.net
Sat Jun 22 11:20:40 PDT 2013
On 22/06/2013 14:50, Uli Schlachter wrote:
> On 22.06.2013 14:44, Quentin Glidic wrote:
>> And that is exactly the point of Requires.private: provide include
>> directories -I in CFLAGS without -l in LIBS while Requires add
>> both.
>
> No, it isn't. Requires.private is about things needed for static
> linking. Let me quote "man pkg-config":
>
>> Requires.private: 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 dynamically 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 dependencies between the libraries.
So “Requires.private shall be used exclusively to specify the
dependencies between the libraries” and this is the case here.
From http://people.freedesktop.org/~dbn/pkg-config-guide.html I quote:
“Cflags: The compiler flags specific to this package and any required
libraries that don't support pkg-config. If the required libraries
support pkg-config, they should be added to Requires or Requires.private.”
And with a simple test:
$ tail test1.pc test2.pc
==> test1.pc <==
Cflags: -I/tmp
Libs: -ltest1
==> test2.pc <==
Requires.private: test1
$ pkg-config --cflags --libs test1
-I/tmp -ltest1
$ pkg-config --cflags --libs test2
-I/tmp
$ pkg-config --cflags --libs --static test1
-I/tmp -ltest1
$ pkg-config --cflags --libs --static test2
-I/tmp -ltest1
I think the result is pretty clear.
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list