libweston: fix pixel-format helpers compilation on non-X11 EGL platforms
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 12 Apr 2017 13:32:09 +0000 (15:32 +0200)
committerDaniel Stone <daniels@collabora.com>
Wed, 12 Apr 2017 13:58:13 +0000 (14:58 +0100)
Since building libweston includes EGL/egl.h from pixel-formats.c,
EGL_CFLAGS must be added to libweston_CFLAGS, as on some platforms that
contains -DMESA_EGL_NO_X11_HEADERS, and fails to compile without it:

  CC       libweston/libweston_3_la-pixel-formats.lo
In file included from [...]/usr/include/EGL/egl.h:39:0,
                 from libweston/pixel-formats.c:39:
[...]/usr/include/EGL/eglplatform.h:119:22:
fatal error: X11/Xlib.h: No such file or directory

Fixes: 903721a6215f ("libweston: Add pixel-format helpers")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Makefile.am

index 94b1c143007334ad1b84cf63b27f030ab26a05bf..45df7feab0a1efe3441595a0ecd0f1a2073e2481 100644 (file)
@@ -72,7 +72,7 @@ install-libweston_moduleLTLIBRARIES install-moduleLTLIBRARIES: install-libLTLIBR
 lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la
 libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
 libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) \
-       $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) $(LIBDRM_CFLAGS)
+       $(COMPOSITOR_CFLAGS) $(EGL_CFLAGS) $(LIBUNWIND_CFLAGS) $(LIBDRM_CFLAGS)
 libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
        $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
        $(LIBINPUT_BACKEND_LIBS) libshared.la