[Mesa-dev] [PATCH v3 5/9] meson: fix vdpau target linkage

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


The VDPAU state tracker needs to be linked with whole-archive (autotools
does this). Because we are linking the whole archive we alos need to
link with libswdri and libswkmsdri if those have been enabled.

Fixes: 68076b87474e7959 ("meson: build gallium vdpau state tracker")
Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
---
 src/gallium/targets/vdpau/meson.build | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/gallium/targets/vdpau/meson.build b/src/gallium/targets/vdpau/meson.build
index a03f0ed..53af146 100644
--- a/src/gallium/targets/vdpau/meson.build
+++ b/src/gallium/targets/vdpau/meson.build
@@ -23,6 +23,7 @@
 # configure.ac)
 
 vdpau_link_args = []
+vdpau_link_with = []
 vdpau_link_depends = []
 vdpau_drivers = []
 
@@ -35,6 +36,13 @@ if with_ld_dynamic_list
   vdpau_link_depends += files('../dri-vdpau.dyn')
 endif
 
+if with_dri
+  vdpau_link_with += libswdri
+endif
+if with_gallium_drisw_kms
+  vdpau_link_with += libswkmsdri
+endif
+
 libvdpau_gallium = shared_library(
   'vdpau_gallium',
   'target.c',
@@ -44,9 +52,10 @@ libvdpau_gallium = shared_library(
   include_directories : [
     inc_common, inc_util, inc_gallium_winsys, inc_gallium_drivers,
   ],
+  link_whole : [libvdpau_st],
   link_with : [
-    libvdpau_st, libgalliumvlwinsys, libgalliumvl, libgallium, libmesa_util,
-    libpipe_loader_static, libws_null, libwsw,
+    libgalliumvlwinsys, libgalliumvl, libgallium, libmesa_util,
+    libpipe_loader_static, libws_null, libwsw, vdpau_link_with,
   ],
   dependencies : [
     dep_thread, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
-- 
git-series 0.9.1


More information about the mesa-dev mailing list