meson: move gl pkgconfig generation out of glx

Because the same generation logic is required by xlib glx and
gallium-xlib glx, it makes sense to pull it out.

v2: - Ensure that libgl is defined before trying to generate a pkgconfig
      file with it.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Dylan Baker 2017-11-02 16:51:40 -07:00
parent dc0ec581f2
commit 13752af4ed
2 changed files with 14 additions and 11 deletions

View File

@ -167,17 +167,6 @@ if with_glx == 'dri'
version : gl_lib_version,
install : true,
)
pkg.generate(
name : 'gl',
filebase : 'gl',
description : 'Mesa OpenGL Library',
version : meson.project_version(),
libraries : libgl,
libraries_private : gl_priv_libs,
requires_private : gl_priv_reqs,
variables : ['glx_tls=yes'],
)
endif
if with_tests

View File

@ -66,3 +66,17 @@ if with_egl
subdir('egl')
endif
subdir('gallium')
# This must be after at least mesa, glx, and gallium, since libgl will be
# defined in one of those subdirs depending on the glx provider.
if with_glx != 'disabled'
pkg.generate(
name : 'gl',
description : 'Mesa OpenGL Library',
version : meson.project_version(),
libraries : libgl,
libraries_private : gl_priv_libs,
requires_private : gl_priv_reqs,
variables : ['glx_tls=yes'],
)
endif