Mesa (staging/19.1): meson: Link xvmc with libxv

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 30 08:43:06 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 1ec508dc92604143eda3bd3b7d00c9b880d4cf07
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ec508dc92604143eda3bd3b7d00c9b880d4cf07

Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Thu Sep 26 15:42:59 2019 -0700

meson: Link xvmc with libxv

Prior to xvmc 1.0.12 libxvmc incorrectly required libxv, but that was
fixed. This results in compilation failures for the gallium xvmc tracker
and tools. This patch fixes that by explicitly linking to libxv.

Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416
       ("meson: build gallium xvmc state tracker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1844
Reviewed-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit e456a053c3d6ec4f3d4581edcad05c72dfdaa407)

---

 meson.build                                 |  4 +++-
 src/gallium/state_trackers/xvmc/meson.build | 10 +++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 2b84be8974e..3c403b84131 100644
--- a/meson.build
+++ b/meson.build
@@ -490,10 +490,12 @@ elif not (with_gallium_r600 or with_gallium_nouveau)
   endif
 endif
 dep_xvmc = null_dep
+dep_xv = null_dep
 with_gallium_xvmc = false
 if _xvmc != 'false'
   dep_xvmc = dependency('xvmc', version : '>= 1.0.6', required : _xvmc == 'true')
-  with_gallium_xvmc = dep_xvmc.found()
+  dep_xv = dependency('xv', required : _xvmc == 'true')
+  with_gallium_xvmc = dep_xvmc.found() and dep_xv.found()
 endif
 
 xvmc_drivers_path = get_option('xvmc-libs-path')
diff --git a/src/gallium/state_trackers/xvmc/meson.build b/src/gallium/state_trackers/xvmc/meson.build
index f66b4f2a337..920b92ee19a 100644
--- a/src/gallium/state_trackers/xvmc/meson.build
+++ b/src/gallium/state_trackers/xvmc/meson.build
@@ -23,7 +23,9 @@ libxvmc_st = static_library(
   files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'),
   c_args : [c_vis_args],
   include_directories : [inc_common],
-  dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3],
+  dependencies : [
+    dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv,
+  ],
 )
 
 # These tests will not work without a working xvmc configuration.
@@ -41,7 +43,8 @@ if with_tools.contains('xvmc')
       _name,
       files('tests/test_ at 0@.c'.format(x), 'tests/testlib.c'),
       dependencies : [
-        dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
+        dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
+        dep_xvmcw, dep_xv,
       ],
       install: true,
     )
@@ -51,7 +54,8 @@ if with_tools.contains('xvmc')
     'xvmc_bench',
     files('tests/xvmc_bench.c', 'tests/testlib.c'),
     dependencies : [
-      dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
+      dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
+      dep_xvmcw, dep_xv,
     ],
     install: true,
   )




More information about the mesa-commit mailing list