diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/winrt/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/winrt/meson.build index d373709b7c..39306c3e37 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/winrt/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/winrt/meson.build @@ -67,7 +67,7 @@ building_for_win10 = cxx.compiles('''#include if not building_for_win10 message('Bumping target Windows version to Windows 10 for building gstwinrt library') - extra_comm_args += ['-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] + extra_comm_args += ['-U_WIN32_WINNT', '-UWINVER', '-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] endif gstwinrt = library('gstwinrt-' + api_version, diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index 7c802e76f8..5734dcbeb5 100644 --- a/subprojects/gst-plugins-bad/meson.build +++ b/subprojects/gst-plugins-bad/meson.build @@ -438,6 +438,8 @@ if host_machine.system() == 'windows' if not building_for_win7 add_project_arguments([ + '-U_WIN32_WINNT', + '-UWINVER', '-D_WIN32_WINNT=_WIN32_WINNT_WIN7', '-DWINVER=_WIN32_WINNT_WIN7', ], language: ['c', 'cpp']) diff --git a/subprojects/gst-plugins-bad/sys/dwrite/meson.build b/subprojects/gst-plugins-bad/sys/dwrite/meson.build index 4fcf7a9e9c..af372f2dee 100644 --- a/subprojects/gst-plugins-bad/sys/dwrite/meson.build +++ b/subprojects/gst-plugins-bad/sys/dwrite/meson.build @@ -49,7 +49,9 @@ endif if cc.has_header('d2d1_3.h') and cc.has_header('dwrite_3.h') # DWRITE_GLYPH_IMAGE_FORMATS enum requires NTDDI_WIN10_RS1 - extra_args += ['-DWINVER=0x0A00', + extra_args += ['-U_WIN32_WINNT', + '-UWINVER', + '-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=0x0A000002', '-DHAVE_DWRITE_COLOR_FONT'] diff --git a/subprojects/gst-plugins-bad/sys/wasapi2/meson.build b/subprojects/gst-plugins-bad/sys/wasapi2/meson.build index 26d382d3f1..59425e623f 100644 --- a/subprojects/gst-plugins-bad/sys/wasapi2/meson.build +++ b/subprojects/gst-plugins-bad/sys/wasapi2/meson.build @@ -123,7 +123,7 @@ building_for_win10 = cxx.compiles('''#include if not building_for_win10 message('Bumping target Windows version to Windows 10 for building wasapi2 plugin') - extra_args += ['-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] + extra_args += ['-U_WIN32_WINNT', '-UWINVER', '-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] endif if not gstwinrt_dep.found() diff --git a/subprojects/gst-plugins-bad/sys/webview2/meson.build b/subprojects/gst-plugins-bad/sys/webview2/meson.build index 1986bc6da3..d4b4e1283e 100644 --- a/subprojects/gst-plugins-bad/sys/webview2/meson.build +++ b/subprojects/gst-plugins-bad/sys/webview2/meson.build @@ -68,7 +68,7 @@ building_for_win10 = cxx.compiles('''#include if not building_for_win10 message('Bumping target Windows version to Windows 10 for building webview2 plugin') - extra_args += ['-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] + extra_args += ['-U_WIN32_WINNT', '-UWINVER', '-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] endif dwmapi_lib = cc.find_library('dwmapi', required : webview2_option) diff --git a/subprojects/gst-plugins-bad/sys/wic/meson.build b/subprojects/gst-plugins-bad/sys/wic/meson.build index d179bf3c85..bbd9ad01dc 100644 --- a/subprojects/gst-plugins-bad/sys/wic/meson.build +++ b/subprojects/gst-plugins-bad/sys/wic/meson.build @@ -63,7 +63,7 @@ building_for_win10 = cxx.compiles('''#include if not building_for_win10 message('Bumping target Windows version to Windows 10 for building wic plugin') - extra_args += ['-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] + extra_args += ['-U_WIN32_WINNT', '-UWINVER', '-DWINVER=0x0A00', '-D_WIN32_WINNT=0x0A00', '-DNTDDI_VERSION=WDK_NTDDI_VERSION'] endif gstwic = library('gstwic', diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build index 1ef2ee1f18..bfd6c412d9 100644 --- a/subprojects/gstreamer/meson.build +++ b/subprojects/gstreamer/meson.build @@ -439,6 +439,8 @@ if host_system == 'windows' if not building_for_win7 add_project_arguments([ + '-U_WIN32_WINNT', + '-UWINVER', '-D_WIN32_WINNT=_WIN32_WINNT_WIN7', '-DWINVER=_WIN32_WINNT_WIN7', ], language: ['c', 'cpp'])