Daniel Stone <[email protected]> writes:

> We can check the version on an existing dependency, rather than spinning
> up pkg-config again just to check the right version.
>
> Signed-off-by: Daniel Stone <[email protected]>
> ---
>  include/meson.build | 7 +++----
>  meson.build         | 3 ---
>  2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/include/meson.build b/include/meson.build
> index 05ef76930..5eefc5f07 100644
> --- a/include/meson.build
> +++ b/include/meson.build
> @@ -72,13 +72,12 @@ conf_data.set_quoted('SHMDIR', '/tmp')
>  conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
>  conf_data.set('WITH_LIBDRM', libdrm_dep.found())
>  conf_data.set('GLAMOR_HAS_DRM_NAME_FROM_FD_2',
> -              dependency('libdrm', version: '>= 2.4.74', required: 
> false).found())
> +              libdrm_dep.found() and 
> libdrm_dep.version().version_compare('>= 2.4.74'))

nirbheek says there's a meson patch to be merged soon that handles the
caching of pkg-config outputs automatically so you don't need to do this
dep.found() and dep.version().version_compare() dance.  That said,
you've reduced the build system complexity with the rest of this patch,
so:

Reviewed-by: Eric Anholt <[email protected]>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to