intel-gpu-tools: avoid include of cairo.h on Android builds
authortgore <tim.gore@intel.com>
Mon, 31 Mar 2014 10:55:40 +0000 (11:55 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 31 Mar 2014 12:09:29 +0000 (14:09 +0200)
A recent commit means igt_debugfs.c now needs to include igt_kms.h,
which in turn includes igt_fb.h and hence cairo.h.
We need to avoid this inclusion of cairo.h when building for Android,
(until we have a cairo port) so I have added a #ifndef around it.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
lib/Android.mk
lib/igt_fb.h

index 6735255..d4ebef4 100644 (file)
@@ -33,7 +33,8 @@ include $(LOCAL_PATH)/Makefile.sources
 
 skip_lib_list := \
     igt_kms.c \
-    igt_kms.h
+    igt_kms.h \
+    igt_fb.c
 
 lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))
 
index 5f0ff51..7242f9b 100644 (file)
 #ifndef __IGT_FB_H__
 #define __IGT_FB_H__
 
+#ifndef ANDROID
 #include <cairo.h>
+#else
+typedef struct _cairo_surface cairo_surface_t;
+typedef struct _cairo cairo_t;
+#endif
 
 #include <drm_fourcc.h>
 #include <xf86drmMode.h>