project('gstreamer', 'c',
- version : '1.17.90',
- meson_version : '>= 0.48',
+ version : '1.19.2',
+ meson_version : '>= 0.54',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
cdata = configuration_data()
-# 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
if cc.get_id() == 'msvc'
- 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
+ ]
+ add_project_arguments(msvc_args, language: 'c')
elif cc.has_link_argument('-Wl,-Bsymbolic-functions')
# FIXME: Add an option for this if people ask for it
add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
[ 's390', 'HAVE_CPU_S390' ],
]
foreach h : host_defines
- if h.get(0) == host_machine.cpu()
+ if h.get(0) == host_machine.cpu_family()
cdata.set(h.get(1), 1)
endif
endforeach
'sys/wait.h',
'ucontext.h',
'unistd.h',
- 'valgrind/valgrind.h',
'sys/resource.h',
'sys/uio.h',
]
'pselect',
'getpagesize',
'clock_gettime',
+ 'clock_nanosleep',
'strnlen',
# These are needed by libcheck
'getline',
platform_deps = [cc.find_library('ws2_32')]
endif
+building_for_uwp = false
+if host_system == 'windows'
+ # Check whether we're building for UWP apps
+ code = '''
+ #include <windows.h>
+ #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
+ #error "Not building for UWP"
+ #endif'''
+ if cc.compiles(code, name : 'building for UWP')
+ building_for_uwp = true
+ endif
+endif
+
backtrace_deps = []
unwind_dep = dependency('libunwind', required : get_option('libunwind'))
dw_dep = dependency('libdw', required: get_option('libdw'))
-dbghelp_dep = dependency('DbgHelp', required : get_option('dbghelp'))
-backtrace_deps = [unwind_dep, dw_dep, dbghelp_dep]
+dbghelp_option = get_option('dbghelp')
+if dbghelp_option.enabled() and building_for_uwp
+ error('DbgHelp is not supported for UWP')
+endif
+have_dbghelp = cc.has_header('dbghelp.h', required: dbghelp_option) and cc.has_header('tlhelp32.h', required: dbghelp_option)
+backtrace_deps = [unwind_dep, dw_dep]
backtrace_source_info = false
backtrace_minimal = false
# MSVC debug stack trace support
-if host_system == 'windows' and dbghelp_dep.found()
+if host_system == 'windows' and have_dbghelp and not building_for_uwp
cdata.set('HAVE_DBGHELP', 1)
backtrace_source_info = true
# DWARF stack trace support with libunwind and elf-utils
privinc = include_directories('gst')
# Find dependencies
-glib_dep = dependency('glib-2.0', version : '>=2.44.0',
+glib_dep = dependency('glib-2.0', version : '>=2.56.0',
fallback: ['glib', 'libglib_dep'])
gobject_dep = dependency('gobject-2.0',
fallback: ['glib', 'libgobject_dep'])
# If we don't build static plugins there is no need to generate pc files
plugins_pkgconfig_install_dir = disabler()
endif
+pkgconfig_variables = ['exec_prefix=${prefix}',
+ 'toolsdir=${exec_prefix}/bin',
+ 'pluginsdir=${libdir}/gstreamer-1.0',
+ 'datarootdir=${prefix}/share',
+ 'datadir=${datarootdir}',
+ 'girdir=${datadir}/gir-1.0',
+ 'typelibdir=${libdir}/girepository-1.0',
+ 'libexecdir=${prefix}/libexec',
+ 'pluginscannerdir=${libexecdir}/gstreamer-1.0']
+pkgconfig_uninstalled_variables = ['exec_prefix=${prefix}',
+ 'gstreamerdir=${prefix}/subprojects/gstreamer',
+ 'bashhelpersdir=${gstreamerdir}/data/bash-completion/helpers',
+ 'helpersdir=${gstreamerdir}/libs/gst/helpers']
+pkgconfig_subdirs = ['gstreamer-1.0']
subdir('gst')
subdir('libs')
if not get_option('tools').disabled()
subdir('tools')
endif
-subdir('pkgconfig')
subdir('tests')
subdir('data')
subdir('docs')
subdir('po')
endif
+subdir('scripts')
+
# Set release date
if gst_version_nano == 0
extract_release_date = find_program('scripts/extract-release-date-from-doap-file.py')