summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glx/meson.build11
-rw-r--r--src/meson.build14
2 files changed, 14 insertions, 11 deletions
diff --git a/src/glx/meson.build b/src/glx/meson.build
index 01ebc567734..43f8fb24efd 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -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
diff --git a/src/meson.build b/src/meson.build
index 186cf92f47e..53c8269a99e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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