summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-08-04 05:34:23 +0530
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-08-04 10:43:13 +0000
commit2881f6d728519b2a6ef2b357178f34a640452b9c (patch)
tree5a87f5c0ec1444f637aebdf0fd91adeb6673bfa4 /meson.build
parent6cf03b21f68ca1a4d47e642179c3f4b011354ca9 (diff)
downloadgstreamer-plugins-bad-2881f6d728519b2a6ef2b357178f34a640452b9c.tar.gz
meson: Only look for Obj-C/C++ compilers on macOS/iOS
On Windows, MinGW-GCC Objective-C/C++ compilers can be in PATH and mess up the build since they may not match the CPU family of the C/C++ compilers we are using. Also require them on macOS/iOS, because they should always be present. Fixes https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/88 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1488>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 8 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 11fb33134..4a7468442 100644
--- a/meson.build
+++ b/meson.build
@@ -33,8 +33,15 @@ plugins = []
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
+host_system = host_machine.system()
-have_objc = add_languages('objc', native: false, required: false)
+if host_system in ['ios', 'darwin']
+ have_objc = add_languages('objc', native: false)
+ have_objcpp = add_languages('objcpp', native: false)
+else
+ have_objc = false
+ have_objcpp = false
+endif
cdata = configuration_data()
@@ -243,7 +250,6 @@ cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name)
cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
# FIXME: This should be exposed as a configuration option
-host_system = host_machine.system()
if host_system == 'linux'
cdata.set_quoted('DEFAULT_VIDEOSRC', 'v4l2src')
elif ['darwin', 'ios'].contains(host_system)
@@ -369,7 +375,6 @@ if ['darwin', 'ios'].contains(host_system)
# cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1)
# endif
endif
-have_objcpp = add_languages('objcpp', native: false, required: false)
have_orcc = false
orcc_args = []