interlace: Make caps writable before modifying them
[platform/upstream/gstreamer.git] / meson.build
index c2f71ed..1de169b 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-plugins-bad', 'c', 'cpp',
-  version : '1.15.2.1',
-  meson_version : '>= 0.47',
+  version : '1.17.1.1',
+  meson_version : '>= 0.49',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -16,7 +16,7 @@ else
 endif
 gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
 
-glib_req = '>= 2.40.0'
+glib_req = '>= 2.44.0'
 orc_req = '>= 0.4.17'
 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
 
@@ -29,10 +29,13 @@ libversion = '@0@.@1@.0'.format(soversion, curversion)
 osxversion = curversion + 1
 
 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+plugins = []
 
 cc = meson.get_compiler('c')
 cxx = meson.get_compiler('cpp')
 
+have_objc = add_languages('objc', native: false, required: false)
+
 cdata = configuration_data()
 
 if cc.get_id() == 'msvc'
@@ -69,6 +72,10 @@ if cc.get_id() == 'msvc'
   export_define = '__declspec(dllexport) extern'
 elif cc.has_argument('-fvisibility=hidden')
   add_project_arguments('-fvisibility=hidden', language: 'c')
+  add_project_arguments('-fvisibility=hidden', language: 'cpp')
+  if have_objc
+    add_project_arguments('-fvisibility=hidden', language: 'objc')
+  endif
   export_define = 'extern __attribute__ ((visibility ("default")))'
 else
   export_define = 'extern'
@@ -146,10 +153,15 @@ check_functions = [
   ['HAVE_GMTIME_R', 'gmtime_r'],
   ['HAVE_MMAP', 'mmap'],
   ['HAVE_PIPE2', 'pipe2'],
+  ['HAVE_GETRUSAGE', 'getrusage', '#include<sys/resource.h>'],
 ]
 
 foreach f : check_functions
-  if cc.has_function(f.get(1))
+  prefix = ''
+  if f.length() == 3
+    prefix = f.get(2)
+  endif
+  if cc.has_function(f.get(1), prefix: prefix)
     cdata.set(f.get(0), 1)
   endif
 endforeach
@@ -163,7 +175,7 @@ cdata.set('SIZEOF_VOIDP', cc.sizeof('void*'))
 cdata.set_quoted('VERSION', gst_version)
 cdata.set_quoted('PACKAGE', 'gst-plugins-bad')
 cdata.set_quoted('PACKAGE_VERSION', gst_version)
-cdata.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer')
+cdata.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/new')
 cdata.set_quoted('PACKAGE_NAME', 'GStreamer Bad Plug-ins')
 cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-bad-1.0')
 cdata.set_quoted('GST_API_VERSION', api_version)
@@ -335,7 +347,9 @@ else
 endif
 
 if ['darwin', 'ios'].contains(host_system)
-  add_languages('objc')
+  if not have_objc
+    error('Building on MacOS/iOS/etc requires an ObjC compiler')
+  endif
   if host_system == 'ios'
     cdata.set('HAVE_IOS', 1)
   endif
@@ -355,6 +369,7 @@ if ['darwin', 'ios'].contains(host_system)
 #    cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1)
 #  endif
 endif
+have_objcpp = add_languages('objcpp', native: false, required: false)
 
 have_orcc = false
 orcc_args = []
@@ -370,6 +385,7 @@ else
   message('Orc Compiler not found or disabled, will use backup C code')
   cdata.set('DISABLE_ORC', 1)
 endif
+cdata.set('GST_ENABLE_EXTRA_CHECKS', not get_option('extra-checks').disabled())
 
 gnustl_dep = declare_dependency()
 if host_system == 'android'
@@ -405,7 +421,7 @@ python3 = import('python').find_installation()
 
 gir = find_program('g-ir-scanner', required : get_option('introspection'))
 gnome = import('gnome')
-build_gir = gir.found() and not meson.is_cross_build()
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
     'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
     'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
@@ -426,6 +442,8 @@ subdir('gst')
 subdir('sys')
 subdir('ext')
 subdir('tests')
+subdir('data')
+subdir('tools')
 subdir('pkgconfig')
 
 # xgettext is optional (on Windows for instance)
@@ -437,3 +455,5 @@ endif
 configure_file(output : 'config.h', configuration : cdata)
 
 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
+
+subdir('docs')