meson: Fix osxaudio build on iOS
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 1 Sep 2018 04:00:23 +0000 (09:30 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sat, 1 Sep 2018 04:00:23 +0000 (09:30 +0530)
Must define HAVE_IOS, and use appleframeworks dependency to ensure the
right frameworks are picked up.

meson.build
sys/osxaudio/meson.build

index d861fdf..a37c7c4 100644 (file)
@@ -134,7 +134,6 @@ check_functions = [
   ['HAVE_GETPAGESIZE', 'getpagesize', '#include<unistd.h>'],
 # check token HAVE_GETTEXT
 # check token HAVE_GST_V4L2
-# check token HAVE_IOS
   ['HAVE_ISINF', 'isinf', '#include<math.h>'],
 # check token HAVE_LIBV4L2
   ['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
@@ -154,6 +153,8 @@ foreach f : check_functions
   endif
 endforeach
 
+cdata.set('HAVE_IOS', host_system == 'ios')
+
 cdata.set('SIZEOF_CHAR', cc.sizeof('char'))
 cdata.set('SIZEOF_INT', cc.sizeof('int'))
 cdata.set('SIZEOF_LONG', cc.sizeof('long'))
index 995705f..4a33028 100644 (file)
@@ -27,16 +27,17 @@ if not have_osxaudio and osxaudio_option.enabled()
 endif
 
 if have_osxaudio
-  osxaudio_dep = [dependency('CoreAudio'), dependency('AudioToolbox')]
+  modules = ['CoreAudio', 'AudioToolBox']
   if host_system == 'darwin'
-    osxaudio_dep += [dependency('AudioUnit'), dependency('CoreServices')]
+    modules += ['AudioUnit', 'CoreServices']
   endif
+  osxaudio_dep = dependency('appleframeworks', modules : modules)
 
   gstosxaudio = library('gstosxaudio',
     osxaudio_sources,
     c_args : gst_plugins_good_args,
     include_directories : [configinc, libsinc],
-    dependencies : [gstaudio_dep] + osxaudio_dep,
+    dependencies : [gstaudio_dep, osxaudio_dep],
     install : true,
     install_dir : plugins_install_dir)
   pkgconfig.generate(gstosxaudio, install_dir : plugins_pkgconfig_install_dir)