aboutsummaryrefslogtreecommitdiff
path: root/ui/meson.build
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2021-02-23 15:03:07 +0900
committerGerd Hoffmann <kraxel@redhat.com>2021-03-04 09:35:30 +0100
commitbc6a3565c89243f0aaa24bac6dc37fb52b16d5c5 (patch)
treec67c6b57bd5832fbf17c70bc2fae1d9c91d54b91 /ui/meson.build
parentd9c32b8f7f5f05511d77a1ec1d1d35bf7bff2961 (diff)
configure: Improve OpenGL dependency detections
This has the following visible changes: - GBM is required only for OpenGL dma-buf. - X11 is explicitly required by gtk-egl. - EGL is now mandatory for the OpenGL displays. The last one needs some detailed description. Before this change, EGL was tested only for OpenGL dma-buf with the check of EGL_MESA_image_dma_buf_export. However, all of the OpenGL displays depend on EGL and EGL_MESA_image_dma_buf_export is always defined by epoxy's EGL interface. Therefore, it makes more sense to always check the presence of EGL and say the OpenGL displays are available along with OpenGL dma-buf if it is present. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210223060307.87736-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/meson.build')
-rw-r--r--ui/meson.build8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/meson.build b/ui/meson.build
index 156b600a99..e8d3ff41b9 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -45,14 +45,15 @@ endif
if config_host.has_key('CONFIG_OPENGL')
opengl_ss = ss.source_set()
+ opengl_ss.add(gbm)
opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'],
if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
ui_modules += {'opengl' : opengl_ss}
endif
-if config_host.has_key('CONFIG_OPENGL_DMABUF')
+if config_host.has_key('CONFIG_OPENGL') and gbm.found()
egl_headless_ss = ss.source_set()
- egl_headless_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL_DMABUF'],
+ egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'],
if_true: files('egl-headless.c'))
ui_modules += {'egl-headless' : egl_headless_ss}
endif
@@ -63,7 +64,8 @@ if gtk.found()
gtk_ss = ss.source_set()
gtk_ss.add(gtk, vte, pixman, files('gtk.c'))
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
- gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c', 'gtk-gl-area.c'))
+ gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.c'))
+ gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
ui_modules += {'gtk' : gtk_ss}
endif