diff --git a/ext/gl/meson.build b/ext/gl/meson.build index 834c13d11b104674e3c0acdbef539742fb6be99d..ca15402d5fc438991c297db0499b598169111303 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]