diff options
Diffstat (limited to 'meta/recipes-devtools/meson/meson/meson-wrapper')
-rwxr-xr-x | meta/recipes-devtools/meson/meson/meson-wrapper | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper index d4ffe60f9a..7455985297 100755 --- a/meta/recipes-devtools/meson/meson/meson-wrapper +++ b/meta/recipes-devtools/meson/meson/meson-wrapper | |||
@@ -1,7 +1,11 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then | 3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then |
4 | echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2 | 4 | exec "meson.real" "$@" |
5 | fi | ||
6 | |||
7 | if [ -z "$SSL_CERT_DIR" ]; then | ||
8 | export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/etc/ssl/certs/" | ||
5 | fi | 9 | fi |
6 | 10 | ||
7 | # If these are set to a cross-compile path, meson will get confused and try to | 11 | # If these are set to a cross-compile path, meson will get confused and try to |
@@ -9,6 +13,19 @@ fi | |||
9 | # config is already in meson.cross. | 13 | # config is already in meson.cross. |
10 | unset CC CXX CPP LD AR NM STRIP | 14 | unset CC CXX CPP LD AR NM STRIP |
11 | 15 | ||
16 | case "$1" in | ||
17 | setup|configure|dist|install|introspect|init|test|wrap|subprojects|rewrite|compile|devenv|env2mfile|help) MESON_CMD="$1" ;; | ||
18 | *) echo meson-wrapper: Implicit setup command assumed; MESON_CMD=setup ;; | ||
19 | esac | ||
20 | |||
21 | if [ "$MESON_CMD" = "setup" ]; then | ||
22 | MESON_SETUP_OPTS=" \ | ||
23 | --cross-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/${TARGET_PREFIX}meson.cross" \ | ||
24 | --native-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.native" \ | ||
25 | " | ||
26 | echo meson-wrapper: Running meson with setup options: \"$MESON_SETUP_OPTS\" | ||
27 | fi | ||
28 | |||
12 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ | 29 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ |
13 | --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \ | 30 | "$@" \ |
14 | "$@" | 31 | $MESON_SETUP_OPTS |