meson: gdk: add Mir backend bits

Completely untested, might not even build.
This commit is contained in:
Tim-Philipp Müller 2017-03-20 11:44:04 +00:00 committed by Emmanuele Bassi
parent e001d95538
commit 152a25d099
5 changed files with 51 additions and 6 deletions

View File

@ -13,6 +13,7 @@ G_BEGIN_DECLS
#mesondefine GDK_WINDOWING_X11
#mesondefine GDK_WINDOWING_BROADWAY
#mesondefine GDK_WINDOWING_WAYLAND
#mesondefine GDK_WINDOWING_MIR
#mesondefine GDK_RENDERING_VULKAN

View File

@ -117,6 +117,7 @@ gdkconfig_cdata = configuration_data()
gdkconfig_cdata.set('GDK_WINDOWING_X11', x11_enabled)
gdkconfig_cdata.set('GDK_WINDOWING_WAYLAND', wayland_enabled)
gdkconfig_cdata.set('GDK_WINDOWING_BROADWAY', broadway_enabled)
gdkconfig_cdata.set('GDK_WINDOWING_MIR', mir_enabled)
gdkconfig_cdata.set('GDK_RENDERING_VULKAN', have_vulkan)
gdkconfig = configure_file(
@ -178,7 +179,7 @@ if wayland_enabled or broadway_enabled
endif
gdk_backends = []
foreach backend : ['broadway', 'wayland', 'x11']
foreach backend : ['broadway', 'wayland', 'x11', 'mir']
if get_variable('@0@_enabled'.format(backend))
subdir(backend)
gdk_deps += get_variable('gdk_@0@_deps'.format(backend))

31
gdk/mir/meson.build Normal file
View File

@ -0,0 +1,31 @@
gdk_mir_sources = files([
'gdkmircursor.c',
'gdkmirdevicemanager.c',
'gdkmirdisplay.c',
'gdkmireventsource.c',
'gdkmirglcontext.c',
'gdkmirkeyboard.c',
'gdkmirkeymap.c',
'gdkmirpointer.c',
'gdkmirscreen.c',
'gdkmirwindow.c',
'gdkmirwindowimpl.c',
'gdkmir-debug.c',
])
#gdk_mir_public_headers = []
#install_headers(gdk_mir_public_headers, subdir: 'gtk-4.0/gdk/mir/')
install_headers('gdkmir.h', subdir: 'gtk-4.0/gdk/')
gdk_mir_deps = [
mirclient_dep,
mircookie_dep,
libcontent_hub_glib_dep,
]
libgdk_mir = static_library('libgdk-mir',
gdk_mir_sources, gdkconfig, gdkenum_h,
include_directories: [confinc, gdkinc],
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"'],
dependencies: [gdk_deps, gdk_mir_deps])

View File

@ -36,7 +36,7 @@ gtk_api_version = '@0@.0'.format(gtk_major_version)
x11_enabled = get_option('enable-x11-backend')
wayland_enabled = get_option('enable-wayland-backend')
broadway_enabled = get_option('enable-broadway-backend')
mir_enabled = get_option('enable-mir-backend')
mkmarshal = find_program('build_marshal.py')
glib_marshal = find_program('glib-genmarshal')
@ -256,6 +256,12 @@ if x11_enabled
endif
endif
if mir_enabled
mirclient_dep = dependency('mirclient', version : '>= 0.22.0')
mircookie_dep = dependency('mircookie', version : '>= 0.17.0')
libcontent_hub_glib_dep = dependency('libcontenthub-glib')
endif
mlib = cc.find_library('m', required: false)
if giounix_dep.found()

View File

@ -1,4 +1,10 @@
option('enable-x11-backend', type: 'boolean', value: 'true')
option('enable-wayland-backend', type: 'boolean', value: 'true')
option('enable-broadway-backend', type: 'boolean', value: 'false')
option('enable-vulkan', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
option('enable-x11-backend', type: 'boolean', value: 'true',
description : 'Enable the X11 gdk backend')
option('enable-wayland-backend', type: 'boolean', value: 'true',
description : 'Enable the wayland gdk backend')
option('enable-broadway-backend', type: 'boolean', value: 'false',
description : 'Enable the broadway (HTML5) gdk backend')
option('enable-mir-backend', type: 'boolean', value: 'false',
description : 'Enable the Mir gdk backend (UNTESTED, NEEDS WORK)')
option('enable-vulkan', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
description : 'Enable support for the Vulkan graphics API')