<div dir="ltr"><div><div><div>Hi,<br><br></div>I've attached a trivial patch we discussed yesterday on #wayland channel. The patch adds a sysroot prefix to the "pkgdatadir" variable. The pkg-config automatically adds sysroot to paths returned by --cflags and --libs but *NOT* to --variable. <br><br>The "pkgdatadir" in wayland-protocols.pc is actually a path pointing to the protocol installation directory on the target system but in a cross-compilation scenario  we need pkg-config to return a temporary location in the staging area on the build system just as it does for --cflags and --libs.<br><br>The change only influences builds with PKG_CONFIG_SYSROOT_DIR environment variable set.<br><br></div><div>There's another pkg-confing variable containing a path to the wayland-scanner tool but I'm not sure how to handle that one correctly in cross-compilation scenario.  The cross-compiled wayland-scanner is likely to be useless on the build system. The pre-existing wayland-scanner on the build system, if any, is also likely to be useless. The only scanner that would actually work is the scanner compiled from wayland sources for the build system architecture and installed somewhere with its own .pc file. This implies that libs using scanner would need 2 independent pkg-config setups. <br><br></div><div>My call would be to get rid of that variable and add --with-wayland-scanner=/path/to/the/right/wayland-scanner config variable to xkbcommon, wayland, weston and whatever uses wayland-scanner.<br></div><div><br></div>Cheers,<br></div>Tomek<br><div><br></div></div>