meson: Pass native: false to add_languages()
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 May 2020 23:30:36 +0000 (05:00 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 13 May 2020 08:29:36 +0000 (13:59 +0530)
This is needed for cross-compiling without a build machine compiler
available. The option was added in 0.54, but we only need this in
Cerbero and it doesn't affect older versions so it should be ok.
Will only cause a spurious warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1266>

ext/modplug/meson.build
ext/openni2/meson.build
meson.build

index 9e99d89..659c291 100644 (file)
@@ -1,4 +1,4 @@
-if not add_languages('cpp', required: get_option('modplug'))
+if not add_languages('cpp', native: false, required: get_option('modplug'))
   subdir_done()
 endif
 
index f14d28c..8b91876 100644 (file)
@@ -1,4 +1,4 @@
-if not add_languages('cpp', required: get_option('openni2'))
+if not add_languages('cpp', native: false, required: get_option('openni2'))
   subdir_done()
 endif
 
index fced765..570f651 100644 (file)
@@ -34,7 +34,7 @@ plugins = []
 cc = meson.get_compiler('c')
 cxx = meson.get_compiler('cpp')
 
-have_objc = add_languages('objc', required : false)
+have_objc = add_languages('objc', native: false, required: false)
 
 cdata = configuration_data()
 
@@ -369,7 +369,7 @@ if ['darwin', 'ios'].contains(host_system)
 #    cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1)
 #  endif
 endif
-have_objcpp = add_languages('objcpp', required : false)
+have_objcpp = add_languages('objcpp', native: false, required: false)
 
 have_orcc = false
 orcc_args = []