applemedia: add the '-fobjc-arc' for darwin/ios
authorMatthew Waters <matthew@centricular.com>
Mon, 17 Jun 2019 04:58:50 +0000 (14:58 +1000)
committerMatthew Waters <matthew@centricular.com>
Mon, 17 Jun 2019 05:02:15 +0000 (15:02 +1000)
We use ARC so we need to signal that to the compiler.

sys/applemedia/meson.build

index 7000ce2..3649eac 100644 (file)
@@ -23,6 +23,15 @@ if not ['darwin', 'ios'].contains(host_system) or applemedia_option.disabled()
   subdir_done()
 endif
 
+if ['darwin', 'ios'].contains(host_system)
+  objc = meson.get_compiler('objc')
+  if not objc.has_argument('-fobjc-arc')
+    error('ARC is required for building')
+  endif
+
+  applemedia_objc_args += ['-fobjc-arc']
+endif
+
 applemedia_frameworks = []
 corefoundation_dep = dependency('CoreFoundation', required : applemedia_option)
 coremedia_dep = dependency('CoreMedia', required : applemedia_option)