From e182dba61feb5b6872154e245014c58d99aa39d8 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 17 Apr 2019 10:36:21 -0700 Subject: dependencies/base: Set PKG_CONFIG_SYSROOT_DIR from cross file In some cases it may be necessary to set PKG_CONFIG_SYSROOT_DIR, like when you've mounted a host architecture system in an arbitrary path. Meson will now check the cross files for a [properties]:sys_root variable and set the PKG_CONFIG_SYSROOT_DIR environment variable based on that variable. Fixes #3801 Fixes #4057 --- docs/markdown/Cross-compilation.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/markdown/Cross-compilation.md') diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md index 36620eb..f200bbb 100644 --- a/docs/markdown/Cross-compilation.md +++ b/docs/markdown/Cross-compilation.md @@ -120,6 +120,7 @@ has_function_printf = true c_args = ['-DCROSS=1', '-DSOMETHING=3'] c_link_args = ['-some_link_arg'] +sys_root = '/some/path' ``` In most cases you don't need the size and alignment settings, Meson @@ -131,6 +132,12 @@ cross compilation you can set them with `[langname]_args = [args]`. Just remember to specify the args as an array and not as a single string (i.e. not as `'-DCROSS=1 -DSOMETHING=3'`). +*Since 0.52.0* The `sys_root` property may point to the root of the host +system path (the system that will run the compiled binaries). This is used +internally by meson to set the PKG_CONFIG_SYSROOT_DIR environment variable +for pkg-config. If this is unset the host system is assumed to share a root +with the build system. + One important thing to note, if you did not define an `exe_wrapper` in the previous section, is that Meson will make a best-effort guess at whether it can run the generated binaries on the build machine. It -- cgit v1.1