cross compiling, pc files and `PKG_CONFIG_SYSROOT_DIR`

jcupitt at jcupitt at
Fri Apr 1 03:27:53 PDT 2011

On 1 April 2011 10:22, Paul Menzel <paulepanter at> wrote:
> So it is `datadir=/usr/share` but for cross compiling it should be `${PKG_CONFIG_SYSROOT_DIR}/usr/share`.

Perhaps you've tried this, but I usually use "--define-variable" when
cross-compiling. Before you start, set your PKG_CONFIG to be something

 $ export PKG_CONFIG="pkg-config --define-variable

and you'll override the setting in the .pc file (I've probably got the
quoting wrong).

I think you're supposed to use the syntax "--define-variable=x=y", but
that breaks some older pkg-config and always causes me trouble, so I
usually avoid it.


More information about the pkg-config mailing list