Back to development
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-base / meson.build
index 9b00253..7f48c7d 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-base', 'c',
-  version : '1.19.2',
-  meson_version : '>= 0.54',
+  version : '1.19.3.1',
+  meson_version : '>= 0.59',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -14,6 +14,7 @@ if version_arr.length() == 4
 else
   gst_version_nano = 0
 endif
+gst_version_is_stable = gst_version_minor.is_even()
 gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
 
 host_system = host_machine.system()
@@ -28,7 +29,12 @@ endif
 
 glib_req = '>= 2.56.0'
 orc_req = '>= 0.4.24'
-gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
+
+if gst_version_is_stable
+  gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
+else
+  gst_req = '>= ' + gst_version
+endif
 
 api_version = '1.0'
 soversion = 0
@@ -39,7 +45,9 @@ libversion = '@0@.@1@.0'.format(soversion, curversion)
 osxversion = curversion + 1
 
 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+static_build = get_option('default_library') == 'static'
 plugins = []
+libraries = []
 
 cc = meson.get_compiler('c')
 
@@ -321,11 +329,11 @@ core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found())
 
 if gio_dep.type_name() == 'pkgconfig'
     core_conf.set_quoted('GIO_MODULE_DIR',
-        gio_dep.get_pkgconfig_variable('giomoduledir'))
+        gio_dep.get_variable('giomoduledir'))
     core_conf.set_quoted('GIO_LIBDIR',
-        gio_dep.get_pkgconfig_variable('libdir'))
+        gio_dep.get_variable('libdir'))
     core_conf.set_quoted('GIO_PREFIX',
-        gio_dep.get_pkgconfig_variable('prefix'))
+        gio_dep.get_variable('prefix'))
 else
     core_conf.set_quoted('GIO_MODULE_DIR', join_paths(get_option('prefix'),
       get_option('libdir'), 'gio/modules'))
@@ -508,7 +516,7 @@ if have_orcc
     ]
   endforeach
 
-  if meson.version().version_compare('>= 0.52')
+  if orc_update_targets.length() > 0
     update_orc_dist_target = alias_target('update-orc-dist', orc_update_targets)
   endif
 endif
@@ -534,19 +542,15 @@ endif
 # Use core_conf after all subdirs have set values
 configure_file(output : 'config.h', configuration : core_conf)
 
-run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
+plugin_names = []
+foreach plugin: plugins
+  if plugin.name().startswith('gst')
+    plugin_names += [plugin.name().substring(3)]
+  else
+    plugin_names += [plugin.name()]
+  endif
+endforeach
 
-if meson.version().version_compare('>= 0.54')
-  plugin_names = []
-  foreach plugin: plugins
-    # FIXME: Use str.subtring() when we can depend on Meson 0.56
-    split = plugin.name().split('gst')
-    if split.length() == 2
-      plugin_names += [split[1]]
-    else
-      warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name())
-      plugin_names += [plugin.name()]
-    endif
-  endforeach
-  summary({'Plugins':plugin_names}, list_sep: ', ')
-endif
+summary({
+    'Plugins': plugin_names,
+}, list_sep: ', ')