cairo: enable opengl for cairo-gl
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sat, 26 Mar 2016 19:35:07 +0000 (16:35 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 26 Mar 2016 20:35:44 +0000 (21:35 +0100)
If OpenGL is enabled then enable cairo-gl.
However if GLESv2 is also present we must choose which implementation to
use.
Since normally OpenGL is more featured, has more dependencies and
wouldn't be present "by accident" it seems like the logical choice to
win over it.

This feature is useful for webkitgtk's accelerated 2d canvas.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/cairo/cairo.mk

index ab0c2e8338d42a45f831734362338195bd9b71b5..b79899565b78555be813c4259a1dd07a20a66144 100644 (file)
@@ -79,11 +79,17 @@ else
 CAIRO_CONF_OPTS += --disable-gobject
 endif
 
+# Can use GL or GLESv2 but not both
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+CAIRO_CONF_OPTS += --enable-gl --disable-glesv2
+CAIRO_DEPENDENCIES += libgl
+else
 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
-CAIRO_CONF_OPTS += --enable-glesv2
+CAIRO_CONF_OPTS += --disable-gl --enable-glesv2
 CAIRO_DEPENDENCIES += libgles
 else
-CAIRO_CONF_OPTS += --disable-glesv2
+CAIRO_CONF_OPTS += --disable-gl --disable-glesv2
+endif
 endif
 
 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)