We absolutely can't merge this as-is, it will break all of the these since
they'll end up linking the backend and frontend, which we're not supposed to do.

The bug you linked to has nothing to do with the problem you describe either,
that issue is that `dependency("threads")` is special in meson, and then evolved
into a larger issue about the pkg-config generator.

The actual problem here is real, but quite different. You can't use
get_pkgconfig_variable to get the cflags. The actual workaround is to do
something like:

prog_pkgconfig = find_program('pkg-config')
dep_vdpau = declare_dependency(
  compile_args : run_command(prog_pkgconfig, ['vdpau', 
'--cflags']).stdout().split(),
)
...

And we'll need a new meson feature for doing this without calling pkg-config
directly. I'll write that feature.

Quoting Greg V (2017-12-31 08:55:23)
> get_pkgconfig_variable('cflags') always returns an empty list. This only
> worked on Linux because the libraries were in the standard include path.
> ---
>  meson.build | 28 ++++++++++++++++------------
>  1 file changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index af62baf437..23faad0a71 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -395,9 +395,10 @@ else
>    with_gallium_vdpau = false
>  endif
>  if with_gallium_vdpau
> -  dep_vdpau = declare_dependency(
> -    compile_args : dep_vdpau.get_pkgconfig_variable('cflags').split()
> -  )
> +  # XXX: https://github.com/mesonbuild/meson/issues/2725
> +  # dep_vdpau = declare_dependency(
> +  #   compile_args : dep_vdpau.get_pkgconfig_variable('cflags').split()
> +  # )
>  endif
>  
>  if with_gallium_vdpau
> @@ -436,9 +437,10 @@ else
>    with_gallium_xvmc = false
>  endif
>  if with_gallium_xvmc
> -  dep_xvmc = declare_dependency(
> -    compile_args : dep_xvmc.get_pkgconfig_variable('cflags').split()
> -  )
> +  # XXX: https://github.com/mesonbuild/meson/issues/2725
> +  # dep_xvmc = declare_dependency(
> +  #   compile_args : dep_xvmc.get_pkgconfig_variable('cflags').split()
> +  # )
>  endif
>  
>  xvmc_drivers_path = get_option('xvmc-libs-path')
> @@ -499,9 +501,10 @@ if with_gallium_omx
>    endif
>  endif
>  if with_gallium_omx
> -  dep_omx = declare_dependency(
> -    compile_args : dep_omx.get_pkgconfig_variable('cflags').split()
> -  )
> +  # XXX: https://github.com/mesonbuild/meson/issues/2725
> +  # dep_omx = declare_dependency(
> +  #   compile_args : dep_omx.get_pkgconfig_variable('cflags').split()
> +  # )
>  endif
>  
>  dep_va = []
> @@ -532,9 +535,10 @@ else
>    with_gallium_va = false
>  endif
>  if with_gallium_va
> -  dep_va = declare_dependency(
> -    compile_args : dep_va.get_pkgconfig_variable('cflags').split()
> -  )
> +  # XXX: https://github.com/mesonbuild/meson/issues/2725
> +  # dep_va = declare_dependency(
> +  #   compile_args : dep_va.get_pkgconfig_variable('cflags').split()
> +  # )
>  endif
>  
>  va_drivers_path = get_option('va-libs-path')
> -- 
> 2.15.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to