cross compiling, pc files and `PKG_CONFIG_SYSROOT_DIR`

Paul Menzel paulepanter at users.sourceforge.net
Mon May 9 06:48:11 PDT 2011


Dear John,


I am sorry for my late answer.

Am Freitag, den 01.04.2011, 11:27 +0100 schrieb jcupitt at gmail.com:
> On 1 April 2011 10:22, Paul Menzel <paulepanter at users.sourceforge.net> 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
> like:
> 
>  $ export PKG_CONFIG="pkg-config --define-variable
> datadir=${PKG_CONFIG_SYSROOT_DIR}/usr/share"
> 
> 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.

Thank you for the suggestion. I have not yet tried this. But as far as I
can see the cross compile environment would need to make sure all
pkg-config variables are adapted and that would be very cumbersome.

Is there another solution which works out of the box? That would be
highly appreciated.


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/pkg-config/attachments/20110509/eb63164b/attachment.pgp>


More information about the pkg-config mailing list