From 703cc1783eef6be9ac4860832b4e6fa6a9881734 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 23 Oct 2024 04:41:23 +0900 Subject: [PATCH] d3d12: Fix MinGW build with installed DirectX-Headers Required for cerbero MinGW build Part-of: --- subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build | 7 +++++++ subprojects/gst-plugins-bad/sys/d3d12/meson.build | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build index e09e1dff47..eab0ba4b86 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/meson.build @@ -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, diff --git a/subprojects/gst-plugins-bad/sys/d3d12/meson.build b/subprojects/gst-plugins-bad/sys/d3d12/meson.build index 835eb82348..ab42a01fad 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/meson.build +++ b/subprojects/gst-plugins-bad/sys/d3d12/meson.build @@ -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,