mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 00:42:36 +00:00
The subproject fails on vs2022 builds with: [...]agc2/input_volume_stats_reporter.cc(89): error C7555: use of designated initializers requires at least '/std:c++20' So let's force C++20 in this case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8270>
59 lines
1.6 KiB
Meson
59 lines
1.6 KiB
Meson
webrtc_sources = [
|
|
'gstwebrtcdsp.cpp',
|
|
'gstwebrtcechoprobe.cpp',
|
|
'gstwebrtcdspplugin.cpp'
|
|
]
|
|
|
|
webrtc_headers = [
|
|
'gstwebrtcechoprobe.h',
|
|
'gstwebrtcdsp.h',
|
|
]
|
|
doc_sources = []
|
|
foreach s: webrtc_sources + webrtc_headers
|
|
doc_sources += meson.current_source_dir() / s
|
|
endforeach
|
|
|
|
plugin_sources += {
|
|
'webrtcdsp': pathsep.join(doc_sources)
|
|
}
|
|
|
|
default_cppstd = 'cpp_std=c++17'
|
|
|
|
webrtc_dep = dependency('webrtc-audio-processing-2', version : ['>= 2.0'],
|
|
required : false)
|
|
if not webrtc_dep.found()
|
|
webrtc_dep = dependency('webrtc-audio-processing-1', version : ['>= 1.0'],
|
|
required : false)
|
|
if webrtc_dep.found()
|
|
cdata.set('HAVE_WEBRTC1', 1)
|
|
endif
|
|
endif
|
|
|
|
if not webrtc_dep.found()
|
|
# Try again, and this time use fallback if requested and possible
|
|
cc = meson.get_compiler('cpp')
|
|
if cc.get_id() == 'msvc'
|
|
# MSVC doesn't like designated initalizers without c++20
|
|
default_cppstd = 'cpp_std=c++20'
|
|
endif
|
|
|
|
webrtc_dep = dependency('webrtc-audio-processing-2', version : ['>= 2.0'],
|
|
allow_fallback : true,
|
|
default_options : [default_cppstd],
|
|
required : get_option('webrtcdsp'))
|
|
endif
|
|
|
|
if webrtc_dep.found()
|
|
gstwebrtcdsp = library('gstwebrtcdsp',
|
|
webrtc_sources,
|
|
cpp_args : gst_plugins_bad_args,
|
|
link_args : noseh_link_args,
|
|
include_directories : [configinc],
|
|
dependencies : [gstbase_dep, gstaudio_dep, gstbadaudio_dep, webrtc_dep],
|
|
install : true,
|
|
install_dir : plugins_install_dir,
|
|
override_options : [default_cppstd],
|
|
)
|
|
plugins += [gstwebrtcdsp]
|
|
endif
|
|
|