mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
meson: Undefine any WINVER and _WIN32_WINNT entries before redefining them
Fixes Cerbero build with MinGW GCC 14, where specifying -DWINVER=0x0601 -DWINVER=0x0A00 is a hard -Werror. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7658>
This commit is contained in:
parent
572f2d10f5
commit
4dcc4b6235
7 changed files with 11 additions and 5 deletions
|
@ -67,7 +67,7 @@ building_for_win10 = cxx.compiles('''#include <windows.h>
|
|||
|
||||
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,
|
||||
|
|
|
@ -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'])
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -123,7 +123,7 @@ building_for_win10 = cxx.compiles('''#include <windows.h>
|
|||
|
||||
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()
|
||||
|
|
|
@ -68,7 +68,7 @@ building_for_win10 = cxx.compiles('''#include <windows.h>
|
|||
|
||||
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)
|
||||
|
|
|
@ -63,7 +63,7 @@ building_for_win10 = cxx.compiles('''#include <windows.h>
|
|||
|
||||
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',
|
||||
|
|
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue