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>
configuration: mf_config,
)
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,
gstmediafoundation = library('gstmediafoundation',
mf_sources,
c_args : gst_plugins_bad_args + extra_c_args,
+# 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,
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,
include_directories : [configinc],
dependencies : [gstaudio_dep, gstwinrt_dep] + wasapi2_dep,
install : true,