meson: Define HAVE_OSX on macOS and iOS
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 15 Aug 2018 14:14:17 +0000 (19:44 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 15 Aug 2018 14:14:17 +0000 (19:44 +0530)
Needed by the shm, ladspa, and lv2 plugins. Same as Autotools.

meson.build

index 501ae60..f75b2de 100644 (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'])