meson: Define HAVE_OSX on macOS and iOS

Needed by the shm, ladspa, and lv2 plugins. Same as Autotools.
This commit is contained in:
Nirbheek Chauhan 2018-08-15 19:44:17 +05:30
parent 2a452f2a5d
commit 546dd512e8

View file

@ -201,7 +201,6 @@ check_functions = [
# check token HAVE_OPENSLES
# check token HAVE_OPUS
# check token HAVE_ORC
# check token HAVE_OSX
# check token HAVE_OSX_VIDEO
['HAVE_PIPE2', 'pipe2'],
# check token HAVE_PNG
@ -333,16 +332,14 @@ cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
host_system = host_machine.system()
if host_system == 'linux'
cdata.set_quoted('DEFAULT_VIDEOSRC', 'v4l2src')
elif host_system == 'osx'
elif host_system == 'darwin'
cdata.set_quoted('DEFAULT_VIDEOSRC', 'avfvideosrc')
cdata.set_quoted('GST_EXTRA_MODULE_SUFFIX', '.dylib')
cdata.set('HAVE_OSX', 1)
else
cdata.set_quoted('DEFAULT_VIDEOSRC', 'videotestsrc')
endif
if host_system == 'darwin'
cdata.set_quoted('GST_EXTRA_MODULE_SUFFIX', '.dylib')
endif
# Mandatory GST deps
gst_dep = dependency('gstreamer-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_dep'])