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;
                      ^~~~~~~~~~~~~~~~~~
This commit is contained in:
Matthew Waters 2019-08-30 13:13:54 +10:00
parent fc539f6162
commit 0973e1d07a

View file

@ -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]
plugins += [gstopengl]