[Mesa-dev] [PATCH] Fix Android compilation when swrast is enabled

Mathieu Maret mathieu.maret at gmail.com
Tue Aug 9 13:01:38 UTC 2016


Swrast add dependency on libdrm, but libdrm is not defined for host
build (only for the targeted device). So host modules likes mesa_gen_matypes
cannot find there libdrm dependency

Signed-off-by: Mathieu Maret <mathieu.maret at gmail.com>
---
 Android.common.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Android.common.mk b/Android.common.mk
index 26d2482..3903ebe 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -100,10 +100,12 @@ LOCAL_CFLAGS += \
 endif
 
 # add libdrm if there are hardware drivers
+ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
 ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
 LOCAL_CFLAGS += -DHAVE_LIBDRM
 LOCAL_SHARED_LIBRARIES += libdrm
 endif
+endif
 
 LOCAL_CPPFLAGS += \
 	$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-std=c++11) \
-- 
2.9.2



More information about the mesa-dev mailing list