diff options
Diffstat (limited to 'meta/classes/meson.bbclass')
-rw-r--r-- | meta/classes/meson.bbclass | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index 5881765abb..e572344bd2 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass | |||
@@ -42,7 +42,8 @@ MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross" | |||
42 | MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross" | 42 | MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross" |
43 | 43 | ||
44 | def meson_array(var, d): | 44 | def meson_array(var, d): |
45 | return "', '".join(d.getVar(var).split()).join(("'", "'")) | 45 | items = d.getVar(var).split() |
46 | return repr(items[0] if len(items) == 1 else items) | ||
46 | 47 | ||
47 | addtask write_config before do_configure | 48 | addtask write_config before do_configure |
48 | do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" | 49 | do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" |
@@ -50,21 +51,21 @@ do_write_config() { | |||
50 | # This needs to be Py to split the args into single-element lists | 51 | # This needs to be Py to split the args into single-element lists |
51 | cat >${WORKDIR}/meson.cross <<EOF | 52 | cat >${WORKDIR}/meson.cross <<EOF |
52 | [binaries] | 53 | [binaries] |
53 | c = [${@meson_array('CC', d)}] | 54 | c = ${@meson_array('CC', d)} |
54 | cpp = [${@meson_array('CXX', d)}] | 55 | cpp = ${@meson_array('CXX', d)} |
55 | ar = [${@meson_array('AR', d)}] | 56 | ar = ${@meson_array('AR', d)} |
56 | nm = [${@meson_array('NM', d)}] | 57 | nm = ${@meson_array('NM', d)} |
57 | ld = [${@meson_array('LD', d)}] | 58 | ld = ${@meson_array('LD', d)} |
58 | strip = [${@meson_array('STRIP', d)}] | 59 | strip = ${@meson_array('STRIP', d)} |
59 | readelf = [${@meson_array('READELF', d)}] | 60 | readelf = ${@meson_array('READELF', d)} |
60 | pkgconfig = 'pkg-config' | 61 | pkgconfig = 'pkg-config' |
61 | 62 | ||
62 | [properties] | 63 | [properties] |
63 | needs_exe_wrapper = true | 64 | needs_exe_wrapper = true |
64 | c_args = [${@meson_array('MESON_C_ARGS', d)}] | 65 | c_args = ${@meson_array('MESON_C_ARGS', d)} |
65 | c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}] | 66 | c_link_args = ${@meson_array('MESON_LINK_ARGS', d)} |
66 | cpp_args = [${@meson_array('MESON_CPP_ARGS', d)}] | 67 | cpp_args = ${@meson_array('MESON_CPP_ARGS', d)} |
67 | cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}] | 68 | cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)} |
68 | gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' | 69 | gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' |
69 | 70 | ||
70 | [host_machine] | 71 | [host_machine] |