gallium/targets: link against XCB only as needed
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 3 May 2017 21:04:20 +0000 (22:04 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 May 2017 18:46:54 +0000 (19:46 +0100)
OMX and VA can optionally use the X11 DRI2/DRI3, thus we should link
only as required.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/targets/omx/Makefile.am
src/gallium/targets/va/Makefile.am

index 5912241b38d1b170116430d07d1621896d3de0da..928e0182a661b7502472346b17899927421fa66b 100644 (file)
@@ -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
 
index f8616406ada9b96094acbfab7b2e0bb18ad98c83..3fcc88e06c14b448fca21796a963863d3d2507d5 100644 (file)
@@ -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