aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-13 01:47:54 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:05 -0400
commitfc9298928658485bf92fc8aaa782d26ca79aee6b (patch)
treec43b99a13d6552d10073fa1af23fb9928962dabb /meson.build
parenta56650518f5ba84ed15b9415fa1041311eeeece0 (diff)
downloadqemu-fc9298928658485bf92fc8aaa782d26ca79aee6b.zip
qemu-fc9298928658485bf92fc8aaa782d26ca79aee6b.tar.gz
qemu-fc9298928658485bf92fc8aaa782d26ca79aee6b.tar.bz2
configure: generate Meson cross file
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 613983e..5ad85a7 100644
--- a/meson.build
+++ b/meson.build
@@ -15,7 +15,12 @@ add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
add_project_arguments(config_host['QEMU_INCLUDES'].split(),
language: ['c', 'cpp', 'objc'])
-add_languages('cpp', required: false, native: false)
+python = import('python').find_installation()
+
+link_language = meson.get_external_property('link_language', 'cpp')
+if link_language == 'cpp'
+ add_languages('cpp', required: true, native: false)
+endif
if host_machine.system() == 'darwin'
add_languages('objc', required: false, native: false)
endif