build: Add a HAVE_EGL define to config.h

This commit is contained in:
Benjamin Otte 2021-10-05 04:14:57 +02:00
parent 04da2ff7c8
commit ae8de7168a
2 changed files with 9 additions and 5 deletions

View File

@ -48,7 +48,7 @@ install_headers(gdk_win32_public_headers, 'gdkwin32.h', subdir: 'gtk-4.0/gdk/win
GDK_WIN32_EGL_CFLAGS = []
if win32_has_egl
if have_egl
GDK_WIN32_EGL_CFLAGS = ['-DGDK_WIN32_ENABLE_EGL']
gdk_win32_sources += ['gdkglcontext-win32-egl.c']
endif

View File

@ -481,7 +481,15 @@ if not cairo_csi_dep.found()
cairo_csi_dep = cc.find_library('cairo-script-interpreter', required: get_option('build-tests'))
endif
have_egl = epoxy_dep.get_variable(
pkgconfig: 'epoxy_has_egl',
internal: 'epoxy_has_egl',
default_value: '0') == '1'
cdata.set('HAVE_CAIRO_SCRIPT_INTERPRETER', cairo_csi_dep.found())
if have_egl
cdata.set('HAVE_EGL', 1)
endif
cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
cdata.set('HAVE_PANGOFT', pangoft_dep.found())
@ -589,10 +597,6 @@ if win32_enabled
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
# Check whether libepoxy is built with EGL support on Windows
win32_has_egl = epoxy_dep.get_variable(
pkgconfig: 'epoxy_has_egl',
internal: 'epoxy_has_egl',
default_value: '0') == '1'
endif
# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by