d3d12: Fix MinGW build with installed DirectX-Headers

Required for cerbero MinGW build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7154>
This commit is contained in:
Seungha Yang 2024-10-23 04:41:23 +09:00 committed by GStreamer Marge Bot
parent db78446576
commit 703cc1783e
2 changed files with 14 additions and 0 deletions

View file

@ -140,6 +140,13 @@ if cc.compiles('''
extra_args += ['-DHAVE_DXGIDEBUG_H']
endif
if cc.get_argument_syntax() != 'msvc' and dx_headers_dep.type_name() != 'internal'
# Required for MinGW because it has old version RPC headers.
# DirectX-Headers subproject is doing this already,
# but not exposed via pkg-config. Define this for installed DirectX-Headers
extra_args += ['-D__REQUIRED_RPCNDR_H_VERSION__=475']
endif
pkg_name = 'gstreamer-d3d12-' + api_version
gstd3d12 = library('gstd3d12-' + api_version,
d3d12_sources,

View file

@ -176,6 +176,13 @@ configure_file(
configuration: d3d12_cdata,
)
if cc.get_argument_syntax() != 'msvc' and dx_headers_dep.type_name() != 'internal'
# Required for MinGW because it has old version RPC headers.
# DirectX-Headers subproject is doing this already,
# but not exposed via pkg-config. Define this for installed DirectX-Headers
extra_args += ['-D__REQUIRED_RPCNDR_H_VERSION__=475']
endif
gstd3d12 = library('gstd3d12',
d3d12_sources,
c_args : gst_plugins_bad_args + extra_args,