Commit c2feeca1 authored by Jon Turney's avatar Jon Turney Committed by Adam Jackson

meson: Absence of dri.pc is an error if building with GLX

Currently, this can error if dri.pc isn't found, as we can't then get
the value of pkgconfig variable from it:

include/ ERROR:  'dri' is not a pkgconfig dependency

I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3
isn't enabled, so we know where to load from.

(For autotools, directly calls `pkg-config
--variable=dridriverdir dri`, the backticks swallowing any error,
causing the value of this define to be empty if dri.pc isn't present)
parent 1f5742d2
......@@ -10,7 +10,7 @@ endif
release = major * 10000000 + minor * 100000 + patch * 1000 + subpatch
dri_dep = dependency('dri', required: build_dri2 or build_dri3)
dri_dep = dependency('dri', required: build_glx)
conf_data = configuration_data()
conf_data.set('_DIX_CONFIG_H_', '1')
......@@ -196,7 +196,9 @@ conf_data.set('DGA', build_dga)
conf_data.set('DPMSExtension', build_dpms)
conf_data.set('DRI2', build_dri2)
conf_data.set('DRI3', build_dri3)
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
if build_glx
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
conf_data.set('HAS_SHM', build_mitshm)
conf_data.set('MITSHM', build_mitshm)
conf_data.set('PANORAMIX', build_xinerama)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment