浏览代码

cairo: enable opengl for cairo-gl

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>
Gustavo Zacarias 9 年之前
父节点
当前提交
99b115e081
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      package/cairo/cairo.mk

+ 8 - 2
package/cairo/cairo.mk

@@ -79,11 +79,17 @@ else
 CAIRO_CONF_OPTS += --disable-gobject
 CAIRO_CONF_OPTS += --disable-gobject
 endif
 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)
 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
-CAIRO_CONF_OPTS += --enable-glesv2
+CAIRO_CONF_OPTS += --disable-gl --enable-glesv2
 CAIRO_DEPENDENCIES += libgles
 CAIRO_DEPENDENCIES += libgles
 else
 else
-CAIRO_CONF_OPTS += --disable-glesv2
+CAIRO_CONF_OPTS += --disable-gl --disable-glesv2
+endif
 endif
 endif
 
 
 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)