Mesa (staging/18.2): TODO: glx: meson: build dri based glx tests, only with -Dglx=dri

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 24 12:35:41 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: ed2705b6cc2a8d82f3b5f51f8c390dab06c370e8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed2705b6cc2a8d82f3b5f51f8c390dab06c370e8

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Wed Dec 12 17:47:36 2018 +0000

TODO: glx: meson: build dri based glx tests, only with -Dglx=dri

The library itself (libGL) is only built when -Dglx=dri, yet it's
accompanying tests are build even with -Dglx=xlib.

Adjust the guards, so we don't build the tests when they are not
applicable

v2:
 - Reword commit message (Dylan)
 - Drop build_by_default hunk (Dylan)

Fixes: a47c525f328 ("meson: build glx")
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
(cherry picked from commit 9527f9ea2611b0793377016c8c16ec58ded7f287)

---

 src/glx/meson.build | 33 +++++++++++++++------------------
 src/meson.build     |  2 +-
 2 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/src/glx/meson.build b/src/glx/meson.build
index f3bbcb433a..6bd3e46265 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -150,26 +150,23 @@ libglx = static_library(
     extra_libs_libglx,
   ],
   dependencies : [dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd],
-  build_by_default : false,
 )
 
-if with_glx == 'dri'
-  libgl = shared_library(
-    gl_lib_name,
-    [],
-    include_directories : [inc_common, inc_glapi, inc_loader, inc_gl_internal],
-    link_with : [libglapi_static, libglapi],
-    link_whole : libglx,
-    link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
-    dependencies : [
-      dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
-      dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
-      extra_deps_libgl,
-    ],
-    version : gl_lib_version,
-    install : true,
-  )
-endif
+libgl = shared_library(
+  gl_lib_name,
+  [],
+  include_directories : [inc_common, inc_glapi, inc_loader, inc_gl_internal],
+  link_with : [libglapi_static, libglapi],
+  link_whole : libglx,
+  link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
+  dependencies : [
+    dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
+    dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
+    extra_deps_libgl,
+  ],
+  version : gl_lib_version,
+  install : true,
+)
 
 if with_tests
   subdir('tests')
diff --git a/src/meson.build b/src/meson.build
index 5cfc4f9d5f..0d524bad96 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -71,7 +71,7 @@ subdir('loader')
 if with_platform_haiku
   subdir('hgl')
 endif
-if with_glx != 'disabled'
+if with_glx == 'dri'
   subdir('glx')
 endif
 if with_gbm




More information about the mesa-commit mailing list