[gtk/wip/fanc999/gtk-3-24-meson-msvc: 29/37] meson: Enable GLES Windows builds via libANGLE
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/fanc999/gtk-3-24-meson-msvc: 29/37] meson: Enable GLES Windows builds via libANGLE
- Date: Mon, 25 Mar 2019 04:28:18 +0000 (UTC)
commit 2e0b27ac5b55c964516b8c66e9c53d20c4082649
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Mar 13 15:32:14 2019 +0800
meson: Enable GLES Windows builds via libANGLE
Check whether the libepoxy library is built on Windows with support for
GLES. If so, enable GLES/EGL support on Windows as well.
gdk/win32/meson.build | 9 ++++++++-
meson.build | 17 +++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/gdk/win32/meson.build b/gdk/win32/meson.build
index 343a9ff402..15043a9a1d 100644
--- a/gdk/win32/meson.build
+++ b/gdk/win32/meson.build
@@ -35,6 +35,13 @@ gdk_win32_public_headers = files(
'gdkwin32window.h',
)
+GDK_WIN32_CFLAGS = ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-DINSIDE_GDK_WIN32']
+
+if win32_has_egl
+ GDK_WIN32_CFLAGS += '-DGDK_WIN32_ENABLE_EGL'
+endif
+
+
install_headers(gdk_win32_public_headers, subdir: 'gtk-3.0/gdk/win32')
install_headers('gdkwin32.h', subdir: 'gtk-3.0/gdk')
@@ -44,5 +51,5 @@ gdk_win32_deps = [ # FIXME
libgdk_win32 = static_library('gdk-win32',
gdk_win32_sources, gdkconfig, gdkenum_h,
include_directories: [confinc, gdkinc],
- c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-DINSIDE_GDK_WIN32'],
+ c_args: GDK_WIN32_CFLAGS,
dependencies: [gdk_deps, gdk_win32_deps])
diff --git a/meson.build b/meson.build
index 7077d3e58d..ba84a966f4 100644
--- a/meson.build
+++ b/meson.build
@@ -586,6 +586,23 @@ if win32_enabled
endif
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
backend_immodules += ['ime']
+
+# Check whether libepoxy is built with EGL support on Windows
+ win32_has_egl = cc.links(
+ '''
+ #include <epoxy/egl.h>
+
+ int main(int argc, char *argv[])
+ {
+ EGLDisplay disp = EGL_NO_DISPLAY;
+
+ return epoxy_egl_version (disp);
+ }
+ ''',
+ dependencies : epoxy_dep,
+ name : 'libepoxy supports EGL on Windows'
+ )
+
endif
# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]