From 0973e1d07aeb0587f0eeda676e83aecae9c1d317 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 30 Aug 2019 13:13:54 +1000 Subject: [PATCH] gl: also build plugin with -fobjc-arc Fixes macos werror build ../ext/gl/caopengllayersink.m:336:23: error: '__bridge_retained' casts have no effect when not using ARC [-Werror,-Warc-bridge-casts-disallowed-in-nonarc] ca_sink->layer = (__bridge_retained gpointer)layer; ^~~~~~~~~~~~~~~~~~ --- ext/gl/meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ext/gl/meson.build b/ext/gl/meson.build index 834c13d..ca15402 100644 --- a/ext/gl/meson.build +++ b/ext/gl/meson.build @@ -52,6 +52,7 @@ if get_option('gl').disabled() or not gstgl_dep.found() endif optional_deps = [] +gl_objc_args = [] if gl_dep.found() # have desktop GL opengl_sources += [ @@ -112,9 +113,23 @@ if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h') optional_deps += allocators_dep endif +if ['darwin', 'ios'].contains(host_system) + if not have_objc + error('No ObjC compiler found') + endif + + objc = meson.get_compiler('objc') + if not objc.has_argument('-fobjc-arc') + error('ARC is required for building') + endif + + gl_objc_args += ['-fobjc-arc'] +endif + gstopengl = library('gstopengl', opengl_sources, c_args : gst_plugins_base_args, + objc_args : gst_plugins_base_args + gl_objc_args, link_args : noseh_link_args, include_directories : [configinc], dependencies : [gstgl_dep, video_dep, @@ -123,4 +138,4 @@ gstopengl = library('gstopengl', install_dir : plugins_install_dir) pkgconfig.generate(gstopengl, install_dir : plugins_pkgconfig_install_dir) -plugins += [gstopengl] \ No newline at end of file +plugins += [gstopengl] -- 2.7.4