meson: Fix osxaudio build on iOS

Must define HAVE_IOS, and use appleframeworks dependency to ensure the
right frameworks are picked up.
This commit is contained in:
Nirbheek Chauhan 2018-09-01 09:30:23 +05:30
parent 66351255f7
commit 5ca7a02371
2 changed files with 6 additions and 4 deletions

View 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'))

View 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)