mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
meson: wasapi2,mediafoundation: Work around Windows SDK header issue
Some SDK headers are not standard compliant, so MSVC will complain when such headers are in use with "/permissive-" compile option. Use "/Zc:twoPhase-" to work around the issue as documented in https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1174>
This commit is contained in:
parent
e94e60c342
commit
47a53f5063
2 changed files with 9 additions and 1 deletions
|
@ -155,6 +155,10 @@ configure_file(
|
|||
configuration: mf_config,
|
||||
)
|
||||
|
||||
# Work around for Windows SDK header issue
|
||||
# https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues
|
||||
extra_cpp_args += cxx.get_supported_arguments(['/Zc:twoPhase-'])
|
||||
|
||||
gstmediafoundation = library('gstmediafoundation',
|
||||
mf_sources,
|
||||
c_args : gst_plugins_bad_args + extra_c_args,
|
||||
|
|
|
@ -124,10 +124,14 @@ if not gstwinrt_dep.found()
|
|||
endif
|
||||
endif
|
||||
|
||||
# Work around for Windows SDK header issue
|
||||
# https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues
|
||||
extra_cpp_args = cxx.get_supported_arguments(['/Zc:twoPhase-'])
|
||||
|
||||
gstwasapi2 = library('gstwasapi2',
|
||||
wasapi2_sources,
|
||||
c_args : gst_plugins_bad_args + ['-DCOBJMACROS'] + extra_args,
|
||||
cpp_args : gst_plugins_bad_args + extra_args,
|
||||
cpp_args : gst_plugins_bad_args + extra_args + extra_cpp_args,
|
||||
include_directories : [configinc],
|
||||
dependencies : [gstaudio_dep, gstwinrt_dep] + wasapi2_dep,
|
||||
install : true,
|
||||
|
|
Loading…
Reference in a new issue