summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-08-04 05:32:08 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-08-04 05:37:19 +0530
commit8c94e746f5ca4a980a18dc8733953653dde6d802 (patch)
tree975f33f5a361bafb1fb6b85158a761ff5930d80c /meson.build
parent141062c4d6d5d37a10bd1669f4ccf8ffd64f42f3 (diff)
downloadgstreamer-plugins-base-8c94e746f5ca4a980a18dc8733953653dde6d802.tar.gz
meson: Only look for Objective-C compiler on macOS/iOS
On Windows, MinGW-GCC Objective-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-base/-/merge_requests/774>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 75c5bf8da..bbe26158b 100644
--- a/meson.build
+++ b/meson.build
@@ -16,8 +16,15 @@ else
endif
gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
+host_system = host_machine.system()
+
have_cxx = add_languages('cpp', native: false, required: false)
-have_objc = add_languages('objc', native: false, required: false)
+
+if host_system in ['ios', 'darwin']
+ have_objc = add_languages('objc', native: false)
+else
+ have_objc = false
+endif
glib_req = '>= 2.44.0'
orc_req = '>= 0.4.24'
@@ -35,7 +42,6 @@ plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
plugins = []
cc = meson.get_compiler('c')
-host_system = host_machine.system()
if cc.get_id() == 'msvc'
# Ignore several spurious warnings for things gstreamer does very commonly