[Mesa-stable] [PATCH v2 19/27] gallium/targets: link against XCB only as needed

Emil Velikov emil.l.velikov at gmail.com
Thu May 4 16:33:10 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

OMX and VA can optionally use the X11 DRI2/DRI3, thus we should link
only as required.

Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/gallium/targets/omx/Makefile.am | 8 ++++++--
 src/gallium/targets/va/Makefile.am  | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/gallium/targets/omx/Makefile.am b/src/gallium/targets/omx/Makefile.am
index 5912241b38d..928e0182a66 100644
--- a/src/gallium/targets/omx/Makefile.am
+++ b/src/gallium/targets/omx/Makefile.am
@@ -29,11 +29,15 @@ libomx_mesa_la_LIBADD = \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/util/libmesautil.la \
 	$(OMX_LIBS) \
-	$(VL_LIBS) \
-	$(XCB_DRI3_LIBS) \
 	$(LIBDRM_LIBS) \
 	$(GALLIUM_COMMON_LIB_DEPS)
 
+if HAVE_PLATFORM_X11
+libomx_mesa_la_LIBADD += \
+	$(VL_LIBS) \
+	$(XCB_DRI3_LIBS)
+endif
+
 EXTRA_libomx_mesa_la_DEPENDENCIES = omx.sym
 EXTRA_DIST = omx.sym
 
diff --git a/src/gallium/targets/va/Makefile.am b/src/gallium/targets/va/Makefile.am
index f8616406ada..3fcc88e06c1 100644
--- a/src/gallium/targets/va/Makefile.am
+++ b/src/gallium/targets/va/Makefile.am
@@ -29,11 +29,15 @@ gallium_drv_video_la_LIBADD = \
 	$(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/util/libmesautil.la \
-	$(VL_LIBS) \
-	$(XCB_DRI3_LIBS) \
 	$(LIBDRM_LIBS) \
 	$(GALLIUM_COMMON_LIB_DEPS)
 
+if HAVE_PLATFORM_X11
+gallium_drv_video_la_LIBADD += \
+	$(VL_LIBS) \
+	$(XCB_DRI3_LIBS)
+endif
+
 EXTRA_gallium_drv_video_la_DEPENDENCIES = va.sym
 EXTRA_DIST = va.sym
 
-- 
2.12.2



More information about the mesa-stable mailing list