mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
webrtcdsp: Use C++20 with MSVC if needed
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>
This commit is contained in:
parent
9b647a0bbd
commit
4cd63e09d9
1 changed files with 10 additions and 1 deletions
|
@ -17,6 +17,8 @@ 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()
|
||||
|
@ -29,8 +31,15 @@ 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
|
||||
|
||||
|
@ -43,7 +52,7 @@ if webrtc_dep.found()
|
|||
dependencies : [gstbase_dep, gstaudio_dep, gstbadaudio_dep, webrtc_dep],
|
||||
install : true,
|
||||
install_dir : plugins_install_dir,
|
||||
override_options : ['cpp_std=c++17'],
|
||||
override_options : [default_cppstd],
|
||||
)
|
||||
plugins += [gstwebrtcdsp]
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue