project('gst-plugins-ugly', 'c',
- version : '1.16.0',
- meson_version : '>= 0.47',
+ version : '1.19.2',
+ meson_version : '>= 0.54',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
endif
gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
-have_cxx = add_languages('cpp', required : false)
+have_cxx = add_languages('cpp', native: false, required: false)
-glib_req = '>= 2.40.0'
+glib_req = '>= 2.56.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
api_version = '1.0'
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+plugins = []
cc = meson.get_compiler('c')
if have_cxx
endif
if cc.get_id() == 'msvc'
- # Ignore several spurious warnings for things gstreamer does very commonly
- # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
- # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
- # NOTE: Only add warnings here if you are sure they're spurious
- add_project_arguments(
+ msvc_args = [
+ # Ignore several spurious warnings for things gstreamer does very commonly
+ # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
+ # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
+ # NOTE: Only add warnings here if you are sure they're spurious
'/wd4018', # implicit signed/unsigned conversion
'/wd4146', # unary minus on unsigned (beware INT_MIN)
'/wd4244', # lossy type conversion (e.g. double -> int)
'/wd4305', # truncating type conversion (e.g. double -> float)
cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
- language : 'c')
+
+ # Enable some warnings on MSVC to match GCC/Clang behaviour
+ '/w14062', # enumerator 'identifier' in switch of enum 'enumeration' is not handled
+ '/w14101', # 'identifier' : unreferenced local variable
+ '/w14189', # 'identifier' : local variable is initialized but not referenced
+ ]
+ if have_cxx
+ add_project_arguments(msvc_args, language: ['c', 'cpp'])
+ else
+ add_project_arguments(msvc_args, language: 'c')
+ endif
# Disable SAFESEH with MSVC for plugins and libs that use external deps that
# are built with MinGW
noseh_link_args = ['/SAFESEH:NO']
cdata.set('DISABLE_ORC', 1)
endif
+gmodule_dep = dependency('gmodule-2.0', fallback : ['glib', 'libgmodule_dep'])
+
+if gmodule_dep.version().version_compare('< 2.67.4')
+ cdata.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)')
+endif
+
ugly_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.')
libsinc = include_directories('gst-libs')
plugins_pkgconfig_install_dir = disabler()
endif
+python3 = import('python').find_installation()
subdir('gst')
subdir('ext')
subdir('tests')
cdata.set('ENABLE_NLS', 1)
subdir('po')
endif
+subdir('docs')
+subdir('scripts')
+
+# Set release date
+if gst_version_nano == 0
+ extract_release_date = find_program('scripts/extract-release-date-from-doap-file.py')
+ run_result = run_command(extract_release_date, gst_version, files('gst-plugins-ugly.doap'))
+ if run_result.returncode() == 0
+ release_date = run_result.stdout().strip()
+ cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date)
+ message('Package release date: ' + release_date)
+ else
+ # Error out if our release can't be found in the .doap file
+ error(run_result.stderr())
+ endif
+endif
configure_file(output : 'config.h', configuration : cdata)
-python3 = import('python').find_installation()
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
+
+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