mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 04:50:11 +01:00
meson: Place all pre_args about HAVE_DRI* into single place
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>
This commit is contained in:
parent
9d6204c799
commit
56b0e3a575
1 changed files with 18 additions and 12 deletions
30
meson.build
30
meson.build
|
|
@ -1686,16 +1686,6 @@ if dep_libdrm.found()
|
|||
endif
|
||||
endif
|
||||
|
||||
if with_dri
|
||||
pre_args += '-DHAVE_DRI'
|
||||
endif
|
||||
if with_dri2
|
||||
pre_args += '-DHAVE_DRI2'
|
||||
endif
|
||||
if with_gallium_drisw_kms
|
||||
pre_args += '-DHAVE_DRISW_KMS'
|
||||
endif
|
||||
|
||||
dep_libudev = dependency('libudev', required : false)
|
||||
if dep_libudev.found()
|
||||
pre_args += '-DHAVE_LIBUDEV'
|
||||
|
|
@ -2087,6 +2077,7 @@ if host_machine.cpu_family() == 'x86_64' and cc.get_id() == 'gcc'
|
|||
endif
|
||||
endif
|
||||
|
||||
with_dri3_modifiers = false
|
||||
if with_platform_x11
|
||||
if with_glx == 'xlib' or with_glx == 'gallium-xlib'
|
||||
dep_x11 = dependency('x11')
|
||||
|
|
@ -2112,13 +2103,12 @@ if with_platform_x11
|
|||
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
|
||||
|
||||
if with_dri3
|
||||
pre_args += '-DHAVE_DRI3'
|
||||
dep_xcb_dri3 = dependency('xcb-dri3')
|
||||
dep_xcb_present = dependency('xcb-present')
|
||||
# until xcb-dri3 has been around long enough to make a hard-dependency:
|
||||
if (dep_xcb_dri3.version().version_compare('>= 1.13') and
|
||||
dep_xcb_present.version().version_compare('>= 1.13'))
|
||||
pre_args += '-DHAVE_DRI3_MODIFIERS'
|
||||
with_dri3_modifiers = true
|
||||
endif
|
||||
dep_xcb_shm = dependency('xcb-shm')
|
||||
dep_xcb_sync = dependency('xcb-sync')
|
||||
|
|
@ -2150,6 +2140,22 @@ if with_platform_x11
|
|||
endif
|
||||
endif
|
||||
|
||||
if with_dri
|
||||
pre_args += '-DHAVE_DRI'
|
||||
endif
|
||||
if with_dri2
|
||||
pre_args += '-DHAVE_DRI2'
|
||||
endif
|
||||
if with_dri3
|
||||
pre_args += '-DHAVE_DRI3'
|
||||
endif
|
||||
if with_dri3_modifiers
|
||||
pre_args += '-DHAVE_DRI3_MODIFIERS'
|
||||
endif
|
||||
if with_gallium_drisw_kms
|
||||
pre_args += '-DHAVE_DRISW_KMS'
|
||||
endif
|
||||
|
||||
if get_option('gallium-extra-hud')
|
||||
pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue