Back to development
[platform/upstream/gstreamer.git] / subprojects / gst-libav / meson.build
index 7da94b8..124a352 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-libav', 'c',
-  version : '1.21.0.1',
-  meson_version : '>= 0.60',
+  version : '1.22.0.1',
+  meson_version : '>= 0.62',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -30,6 +30,7 @@ libavutil_dep = dependency('libavutil', version: '>= 56.14.100',
 libav_deps = [libavfilter_dep, libavformat_dep, libavcodec_dep, libavutil_dep]
 
 cc = meson.get_compiler('c')
+static_build = get_option('default_library') == 'static'
 
 check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
 #if LIBAVCODEC_VERSION_MICRO >= 100
@@ -139,6 +140,12 @@ if cc.get_id() == 'msvc'
   add_project_arguments(msvc_args, language: ['c', 'cpp'])
 endif
 
+# glib doesn't support unloading, which means that unloading and reloading
+# any library that registers static types will fail
+if cc.has_link_argument('-Wl,-z,nodelete')
+  add_project_link_arguments('-Wl,-z,nodelete', language: 'c')
+endif
+
 # Symbol visibility
 if cc.has_argument('-fvisibility=hidden')
   add_project_arguments('-fvisibility=hidden', language: 'c')
@@ -193,7 +200,6 @@ warning_flags = [
   '-Waddress',
   '-Wno-multichar',
   '-Waggregate-return',
-  '-Wdeclaration-after-statement',
   '-Wvla',
   '-Wpointer-arith',
 ]
@@ -229,3 +235,13 @@ if gst_version_nano == 0
 endif
 
 configure_file(output: 'config.h', configuration: cdata)
+
+meson.add_dist_script('scripts/gen-changelog.py', meson.project_name(), '1.20.0', meson.project_version())
+
+gst_plugins = []
+foreach plugin: plugins
+  pkgconfig.generate(plugin, install_dir: plugins_pkgconfig_install_dir)
+  dep = declare_dependency(link_with: plugin, variables: {'full_path': plugin.full_path()})
+  meson.override_dependency(plugin.name(), dep)
+  gst_plugins += [dep]
+endforeach