[Mesa-dev] [PATCH] meson: libdrm shouldn't appear in Requires.private: if it wasn't found
Dylan Baker
dylan at pnwbakers.com
Fri Jan 26 18:05:12 UTC 2018
Please add this to the commit message:
Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack")
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Jon Turney (2018-01-26 04:42:50)
> Otherwise, using pkg-config to retrieve flags will fail, e.g.
>
> $ pkg-config gl --cflags
> Package libdrm was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libdrm.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libdrm', required by 'gl', not found
>
> Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
> ---
> meson.build | 6 ++++--
> src/mesa/drivers/dri/meson.build | 7 ++++++-
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index bc5996992a3..824e3c46bc5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1213,8 +1213,10 @@ inc_include = include_directories('include')
>
> gl_priv_reqs = [
> 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb',
> - 'xcb-glx >= 1.8.1', 'libdrm >= 2.4.75',
> -]
> + 'xcb-glx >= 1.8.1']
> +if dep_libdrm.found()
> + gl_priv_reqs += 'libdrm >= 2.4.75'
> +endif
> if dep_xxf86vm != [] and dep_xxf86vm.found()
> gl_priv_reqs += 'xxf86vm'
> endif
> diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build
> index 94798b0f5da..87021fba885 100644
> --- a/src/mesa/drivers/dri/meson.build
> +++ b/src/mesa/drivers/dri/meson.build
> @@ -67,12 +67,17 @@ endif
> # This needs to be installed if any dri drivers (including gallium dri drivers)
> # are built.
> if with_dri
> + dri_req_private = []
> + if dep_libdrm.found()
> + dri_req_private = ['libdrm >= 2.4.75'] # FIXME: don't hardcode this
> + endif
> +
> pkg.generate(
> name : 'dri',
> filebase : 'dri',
> description : 'Direct Rendering Infrastructure',
> version : meson.project_version(),
> variables : ['dridriverdir=${prefix}/' + dri_drivers_path],
> - requires_private : ['libdrm >= 2.4.75'], # FIXME: don't hardcode this
> + requires_private : dri_req_private,
> )
> endif
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180126/f26b2a51/attachment.sig>
More information about the mesa-dev
mailing list