[Mesa-dev] [PATCH v3 2/9] meson: link dri3 xcb libs into vlwinsys instead of into each target

Dylan Baker dylan at pnwbakers.com
Fri Feb 2 19:30:38 UTC 2018


This makes the dependencies easier to manage, since each media target
doesn't need to worry about linking to half a dozen libraries.

Fixes: b1b65397d0c4978e3 ("meson: Build gallium auxiliary")
Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
---
 src/gallium/auxiliary/meson.build            | 7 ++++++-
 src/gallium/targets/omx-bellagio/meson.build | 5 +----
 src/gallium/targets/va/meson.build           | 6 +-----
 src/gallium/targets/vdpau/meson.build        | 3 +--
 src/gallium/targets/xa/meson.build           | 3 +--
 src/gallium/targets/xvmc/meson.build         | 5 +----
 6 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build
index 6f1542d..5908f9c 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -452,10 +452,15 @@ files_libgalliumvl = files(
   'vl/vl_zscan.h',
 )
 
+vlwinsys_deps = []
 files_libgalliumvlwinsys = files('vl/vl_winsys.h')
 if with_dri2
   files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
   if with_dri3
+    vlwinsys_deps += [
+      dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
+      dep_xcb_dri3, 
+    ]
     files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
   endif
 endif
@@ -526,6 +531,6 @@ libgalliumvlwinsys = static_library(
   'galliumvlwinsys',
   files_libgalliumvlwinsys,
   include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
-  dependencies : [dep_libdrm],
+  dependencies : [dep_libdrm, vlwinsys_deps],
   build_by_default : false,
 )
diff --git a/src/gallium/targets/omx-bellagio/meson.build b/src/gallium/targets/omx-bellagio/meson.build
index a3fba3f..c9e8eb8 100644
--- a/src/gallium/targets/omx-bellagio/meson.build
+++ b/src/gallium/targets/omx-bellagio/meson.build
@@ -44,10 +44,7 @@ libomx_gallium = shared_library(
     libpipe_loader_static, libws_null, libwsw,
   ],
   link_depends : omx_link_depends,
-  dependencies : [
-    dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_libdrm, dep_thread,
-    driver_r600, driver_radeonsi, driver_nouveau,
-  ],
+  dependencies : [dep_thread, driver_r600, driver_radeonsi, driver_nouveau],
   install : true,
   install_dir : omx_drivers_path,
 )
diff --git a/src/gallium/targets/va/meson.build b/src/gallium/targets/va/meson.build
index 0ea0cd1..1e453c9 100644
--- a/src/gallium/targets/va/meson.build
+++ b/src/gallium/targets/va/meson.build
@@ -22,7 +22,6 @@
 # Static targets are always enabled in autotools (unless you modify
 # configure.ac)
 
-va_deps = []
 va_link_args = []
 va_link_depends = []
 va_drivers = []
@@ -31,9 +30,6 @@ if with_ld_version_script
   va_link_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'va.sym')]
   va_link_depends += files('va.sym')
 endif
-if with_platform_x11
-  va_deps += [dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_xcb_dri3]
-endif
 
 libva_gallium = shared_library(
   'gallium_drv_video',
@@ -49,7 +45,7 @@ libva_gallium = shared_library(
     libpipe_loader_static, libws_null, libwsw,
   ],
   dependencies : [
-    dep_libdrm, dep_thread, va_deps, driver_r600, driver_radeonsi, driver_nouveau,
+    dep_libdrm, dep_thread, driver_r600, driver_radeonsi, driver_nouveau,
   ],
   link_depends : va_link_depends,
   install : true,
diff --git a/src/gallium/targets/vdpau/meson.build b/src/gallium/targets/vdpau/meson.build
index 67f1469..a03f0ed 100644
--- a/src/gallium/targets/vdpau/meson.build
+++ b/src/gallium/targets/vdpau/meson.build
@@ -49,8 +49,7 @@ libvdpau_gallium = shared_library(
     libpipe_loader_static, libws_null, libwsw,
   ],
   dependencies : [
-    dep_thread, dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_libdrm,
-    driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
+    dep_thread, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
   ],
   link_depends : vdpau_link_depends,
 )
diff --git a/src/gallium/targets/xa/meson.build b/src/gallium/targets/xa/meson.build
index 8ff6486..75808cd 100644
--- a/src/gallium/targets/xa/meson.build
+++ b/src/gallium/targets/xa/meson.build
@@ -45,8 +45,7 @@ libxatracker = shared_library(
   ],
   link_depends : xa_link_depends,
   dependencies : [
-    dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_libdrm, dep_thread,
-    driver_nouveau, driver_i915, driver_svga, driver_freedreno,
+    dep_thread, driver_nouveau, driver_i915, driver_svga, driver_freedreno,
   ],
   install : true,
 )
diff --git a/src/gallium/targets/xvmc/meson.build b/src/gallium/targets/xvmc/meson.build
index 48759de..07d6c72 100644
--- a/src/gallium/targets/xvmc/meson.build
+++ b/src/gallium/targets/xvmc/meson.build
@@ -44,10 +44,7 @@ libxvmc_gallium = shared_library(
     libxvmc_st, libgalliumvlwinsys, libgalliumvl, libgallium, libmesa_util,
     libpipe_loader_static, libws_null, libwsw,
   ],
-  dependencies : [
-    dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_libdrm, dep_thread,
-    driver_r600, driver_nouveau,
-  ],
+  dependencies : [dep_thread, driver_r600, driver_nouveau],
   link_depends : xvmc_link_depends,
 )
 
-- 
git-series 0.9.1


More information about the mesa-dev mailing list