Commit 0973e1d0 authored by Matthew Waters's avatar Matthew Waters 🐨

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;
                      ^~~~~~~~~~~~~~~~~~
parent fc539f61
......@@ -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]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment