Module: Mesa
Branch: master
Commit: 13752af4edcbebabf20c031a4dc441a5bf7456f4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=13752af4edcbebabf20c031a4dc441a5bf7456f4

Author: Dylan Baker <[email protected]>
Date:   Thu Nov  2 16:51:40 2017 -0700

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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>

---

 src/glx/meson.build | 11 -----------
 src/meson.build     | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/glx/meson.build b/src/glx/meson.build
index 01ebc56773..43f8fb24ef 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 186cf92f47..53c8269a99 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

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to