2017-04-18 17:04:31 +00:00
|
|
|
gdk_public_sources = files([
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdk.c',
|
|
|
|
'gdkapplaunchcontext.c',
|
|
|
|
'gdkcairo.c',
|
2018-04-11 22:16:43 +00:00
|
|
|
'gdkcairocontext.c',
|
2014-05-29 03:55:53 +00:00
|
|
|
'gdkclipboard.c',
|
2017-11-22 09:44:30 +00:00
|
|
|
'gdkcontentdeserializer.c',
|
2017-11-17 16:31:59 +00:00
|
|
|
'gdkcontentformats.c',
|
2017-11-24 05:17:37 +00:00
|
|
|
'gdkcontentprovider.c',
|
|
|
|
'gdkcontentproviderimpl.c',
|
2017-11-24 10:15:51 +00:00
|
|
|
'gdkcontentserializer.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkcursor.c',
|
|
|
|
'gdkdevice.c',
|
2016-08-23 06:21:54 +00:00
|
|
|
'gdkdevicepad.c',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkdevicetool.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkdisplay.c',
|
|
|
|
'gdkdisplaymanager.c',
|
2018-07-02 11:39:09 +00:00
|
|
|
'gdkdrag.c',
|
2017-03-11 22:31:31 +00:00
|
|
|
'gdkdrawcontext.c',
|
2018-04-30 12:10:44 +00:00
|
|
|
'gdkdrop.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkevents.c',
|
2018-09-03 22:36:56 +00:00
|
|
|
'filetransferportal.c',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkframeclock.c',
|
|
|
|
'gdkframeclockidle.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkframetimings.c',
|
|
|
|
'gdkgl.c',
|
|
|
|
'gdkglcontext.c',
|
|
|
|
'gdkglobals.c',
|
2018-03-05 13:38:38 +00:00
|
|
|
'gdkgltexture.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkkeys.c',
|
|
|
|
'gdkkeyuni.c',
|
2018-03-06 02:41:13 +00:00
|
|
|
'gdkmemorytexture.c',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkmonitor.c',
|
2018-02-16 04:32:32 +00:00
|
|
|
'gdkpaintable.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkpango.c',
|
|
|
|
'gdkpixbuf-drawable.c',
|
2017-11-24 09:13:23 +00:00
|
|
|
'gdkpipeiostream.c',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkrectangle.c',
|
|
|
|
'gdkrgba.c',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkseat.c',
|
|
|
|
'gdkseatdefault.c',
|
2018-03-18 18:21:33 +00:00
|
|
|
'gdksnapshot.c',
|
2017-11-02 20:39:00 +00:00
|
|
|
'gdktexture.c',
|
2017-03-11 22:31:31 +00:00
|
|
|
'gdkvulkancontext.c',
|
2018-03-20 10:46:11 +00:00
|
|
|
'gdksurface.c',
|
2020-02-16 11:59:24 +00:00
|
|
|
'gdkpopuplayout.c',
|
2020-02-29 14:17:02 +00:00
|
|
|
'gdkprofiler.c',
|
|
|
|
'gdkpopup.c',
|
2020-02-29 15:31:22 +00:00
|
|
|
'gdktoplevellayout.c',
|
2020-07-30 21:06:59 +00:00
|
|
|
'gdktoplevelsize.c',
|
2020-02-29 15:07:43 +00:00
|
|
|
'gdktoplevel.c',
|
2020-03-03 23:55:45 +00:00
|
|
|
'gdkdragsurface.c',
|
2016-08-23 06:21:54 +00:00
|
|
|
])
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdk_public_headers = files([
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdk-autocleanup.h',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdk.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkapplaunchcontext.h',
|
|
|
|
'gdkcairo.h',
|
2018-04-11 22:16:43 +00:00
|
|
|
'gdkcairocontext.h',
|
2014-05-29 03:55:53 +00:00
|
|
|
'gdkclipboard.h',
|
2017-11-22 09:44:30 +00:00
|
|
|
'gdkcontentdeserializer.h',
|
2017-11-17 16:31:59 +00:00
|
|
|
'gdkcontentformats.h',
|
2017-11-24 05:17:37 +00:00
|
|
|
'gdkcontentprovider.h',
|
|
|
|
'gdkcontentproviderimpl.h',
|
2017-11-24 10:15:51 +00:00
|
|
|
'gdkcontentserializer.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkcursor.h',
|
|
|
|
'gdkdevice.h',
|
2016-08-23 06:21:54 +00:00
|
|
|
'gdkdevicepad.h',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkdevicetool.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkdisplay.h',
|
|
|
|
'gdkdisplaymanager.h',
|
2018-07-02 11:39:09 +00:00
|
|
|
'gdkdrag.h',
|
2017-05-24 08:09:35 +00:00
|
|
|
'gdkdrawcontext.h',
|
2018-04-30 12:10:44 +00:00
|
|
|
'gdkdrop.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkevents.h',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkframeclock.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkframetimings.h',
|
|
|
|
'gdkglcontext.h',
|
2018-03-05 13:38:38 +00:00
|
|
|
'gdkgltexture.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkkeys.h',
|
|
|
|
'gdkkeysyms.h',
|
2018-03-12 04:12:54 +00:00
|
|
|
'gdkmemorytexture.h',
|
2016-08-23 06:21:54 +00:00
|
|
|
'gdkmonitor.h',
|
2018-02-16 04:32:32 +00:00
|
|
|
'gdkpaintable.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdkpango.h',
|
|
|
|
'gdkpixbuf.h',
|
|
|
|
'gdkrectangle.h',
|
|
|
|
'gdkrgba.h',
|
2016-08-23 06:21:54 +00:00
|
|
|
'gdkseat.h',
|
2018-03-18 18:21:33 +00:00
|
|
|
'gdksnapshot.h',
|
2017-11-02 20:39:00 +00:00
|
|
|
'gdktexture.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
'gdktypes.h',
|
2017-05-24 08:18:37 +00:00
|
|
|
'gdkvulkancontext.h',
|
2018-03-20 10:46:11 +00:00
|
|
|
'gdksurface.h',
|
2020-02-16 11:59:24 +00:00
|
|
|
'gdkpopuplayout.h',
|
2020-02-29 14:17:02 +00:00
|
|
|
'gdkpopup.h',
|
2020-02-29 15:31:22 +00:00
|
|
|
'gdktoplevellayout.h',
|
2020-07-30 21:06:59 +00:00
|
|
|
'gdktoplevelsize.h',
|
2020-02-29 15:07:43 +00:00
|
|
|
'gdktoplevel.h',
|
2020-03-03 23:55:45 +00:00
|
|
|
'gdkdragsurface.h',
|
2016-08-23 06:21:54 +00:00
|
|
|
])
|
2017-03-19 15:46:55 +00:00
|
|
|
install_headers(gdk_public_headers, subdir: 'gtk-4.0/gdk/')
|
2016-08-21 14:00:37 +00:00
|
|
|
|
2017-04-18 17:04:31 +00:00
|
|
|
gdk_sources = gdk_public_sources
|
|
|
|
|
2016-08-23 06:21:54 +00:00
|
|
|
gdk_private_h_sources = files([
|
2017-08-05 13:34:39 +00:00
|
|
|
'gdkeventsprivate.h',
|
2016-08-21 14:00:37 +00:00
|
|
|
'gdkdevicetoolprivate.h',
|
|
|
|
'gdkmonitorprivate.h',
|
2016-09-26 10:51:17 +00:00
|
|
|
'gdkseatdefaultprivate.h',
|
2020-07-30 21:06:59 +00:00
|
|
|
'gdktoplevelsizeprivate.h',
|
2016-08-23 06:21:54 +00:00
|
|
|
])
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdk_gresource_xml = configure_file(output : 'gdk.gresource.xml',
|
2017-04-19 13:08:13 +00:00
|
|
|
input : 'gen-gdk-gresources-xml.py',
|
2017-03-19 15:46:55 +00:00
|
|
|
command : [find_program('gen-gdk-gresources-xml.py'),
|
|
|
|
meson.current_source_dir(), '@OUTPUT@'])
|
|
|
|
|
|
|
|
gdkresources = gnome.compile_resources('gdkresources',
|
|
|
|
gdk_gresource_xml,
|
2016-08-21 14:00:37 +00:00
|
|
|
source_dir: '.',
|
|
|
|
c_name: '_gdk',
|
2017-03-19 15:46:55 +00:00
|
|
|
extra_args: '--manual-register')
|
2016-08-22 19:26:38 +00:00
|
|
|
|
2017-04-18 13:13:51 +00:00
|
|
|
gdk_headers = gdk_public_headers
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdk_enums = gnome.mkenums('gdkenumtypes',
|
|
|
|
sources: gdk_public_headers,
|
|
|
|
c_template : 'gdkenumtypes.c.template',
|
|
|
|
h_template : 'gdkenumtypes.h.template',
|
2017-05-23 08:32:27 +00:00
|
|
|
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gdk'),
|
2017-03-19 15:46:55 +00:00
|
|
|
install_header : true)
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdkenum_h = gdk_enums[1]
|
2016-08-21 14:00:37 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdk_marshalers = gnome.genmarshal('gdkmarshalers',
|
|
|
|
sources : 'gdkmarshalers.list',
|
|
|
|
prefix : '_gdk_marshal',
|
|
|
|
valist_marshallers : true)
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
gdkmarshal_h = gdk_marshalers[1]
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2017-03-17 23:43:36 +00:00
|
|
|
gdkconfig_cdata = configuration_data()
|
|
|
|
gdkconfig_cdata.set('GDK_WINDOWING_X11', x11_enabled)
|
|
|
|
gdkconfig_cdata.set('GDK_WINDOWING_WAYLAND', wayland_enabled)
|
2017-08-01 08:49:08 +00:00
|
|
|
gdkconfig_cdata.set('GDK_WINDOWING_WIN32', win32_enabled)
|
2017-03-17 23:43:36 +00:00
|
|
|
gdkconfig_cdata.set('GDK_WINDOWING_BROADWAY', broadway_enabled)
|
2020-04-23 23:36:46 +00:00
|
|
|
gdkconfig_cdata.set('GDK_WINDOWING_MACOS', macos_enabled)
|
2017-03-17 23:43:36 +00:00
|
|
|
gdkconfig_cdata.set('GDK_RENDERING_VULKAN', have_vulkan)
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2016-08-22 19:26:38 +00:00
|
|
|
gdkconfig = configure_file(
|
|
|
|
input : 'gdkconfig.h.meson',
|
2016-08-15 08:03:57 +00:00
|
|
|
output : 'gdkconfig.h',
|
2017-03-17 23:43:36 +00:00
|
|
|
configuration : gdkconfig_cdata,
|
2017-05-23 08:32:27 +00:00
|
|
|
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gdk'))
|
2017-03-19 15:46:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
gdkversion_cdata = configuration_data()
|
|
|
|
gdkversion_cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
|
|
|
|
gdkversion_cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
|
|
|
|
gdkversion_cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2016-08-23 06:21:54 +00:00
|
|
|
gdkversionmacros = configure_file(
|
|
|
|
input : 'gdkversionmacros.h.in',
|
|
|
|
output : 'gdkversionmacros.h',
|
2017-03-19 15:46:55 +00:00
|
|
|
configuration: gdkversion_cdata,
|
2017-05-23 08:32:27 +00:00
|
|
|
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gdk'))
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2017-03-20 00:37:09 +00:00
|
|
|
gdkinc = include_directories('.')
|
2018-05-03 11:58:33 +00:00
|
|
|
gdkx11_inc = include_directories('x11')
|
|
|
|
gdkwayland_inc = include_directories('wayland')
|
2017-03-20 00:37:09 +00:00
|
|
|
|
2016-09-10 18:40:02 +00:00
|
|
|
wlinc = include_directories('.')
|
2017-08-07 11:10:18 +00:00
|
|
|
win32rcinc = include_directories('win32/rc')
|
2016-08-21 14:00:37 +00:00
|
|
|
|
2017-03-23 15:54:58 +00:00
|
|
|
gdk_gen_headers = [gdkenum_h, gdkmarshal_h, gdkconfig, gdkversionmacros]
|
2016-08-21 15:16:03 +00:00
|
|
|
|
|
|
|
gdk_deps = [
|
2017-03-23 20:55:59 +00:00
|
|
|
libm,
|
2016-08-21 15:16:03 +00:00
|
|
|
pixbuf_dep,
|
|
|
|
cairo_dep,
|
|
|
|
pango_dep,
|
2019-02-04 23:07:14 +00:00
|
|
|
fribidi_dep,
|
2016-08-21 15:16:03 +00:00
|
|
|
cairogobj_dep,
|
|
|
|
glib_dep,
|
2017-09-07 18:23:41 +00:00
|
|
|
gobject_dep,
|
2018-02-16 07:41:48 +00:00
|
|
|
graphene_dep,
|
2016-08-21 15:16:03 +00:00
|
|
|
epoxy_dep,
|
|
|
|
fontconfig_dep,
|
2017-08-01 08:49:08 +00:00
|
|
|
platform_gio_dep,
|
2017-03-17 23:43:36 +00:00
|
|
|
pangocairo_dep,
|
2018-02-05 11:42:02 +00:00
|
|
|
vulkan_dep,
|
2016-08-21 15:16:03 +00:00
|
|
|
]
|
|
|
|
|
2019-05-30 02:02:30 +00:00
|
|
|
if profiler_enabled
|
2020-08-21 22:28:29 +00:00
|
|
|
if libsysprof_capture_dep.found()
|
|
|
|
gdk_deps += [libsysprof_capture_dep]
|
2019-05-30 02:02:30 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
# add generated gdk sources
|
|
|
|
gdk_sources += [
|
2016-08-21 15:16:03 +00:00
|
|
|
gdkconfig,
|
2017-03-19 15:46:55 +00:00
|
|
|
gdk_enums,
|
|
|
|
gdk_marshalers,
|
2016-08-23 06:21:54 +00:00
|
|
|
gdkresources,
|
|
|
|
gdkversionmacros,
|
2017-04-18 13:13:51 +00:00
|
|
|
gdk_private_h_sources,
|
|
|
|
gdk_public_headers
|
2016-08-21 15:16:03 +00:00
|
|
|
]
|
|
|
|
|
2017-03-19 15:46:55 +00:00
|
|
|
if wayland_enabled or broadway_enabled
|
2018-04-21 17:30:12 +00:00
|
|
|
if cc.has_function('shm_open')
|
2017-03-19 15:46:55 +00:00
|
|
|
shmlib = []
|
2018-04-21 17:30:12 +00:00
|
|
|
elif cc.has_function('shm_open', args : '-lrt')
|
2017-03-19 15:46:55 +00:00
|
|
|
shmlib = cc.find_library('rt')
|
|
|
|
else
|
|
|
|
shmlib = []
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-07-18 00:57:17 +00:00
|
|
|
libgdk_c_args = [
|
|
|
|
'-DGTK_COMPILATION',
|
|
|
|
'-DG_LOG_DOMAIN="Gdk"',
|
|
|
|
]
|
|
|
|
|
2017-03-20 00:37:09 +00:00
|
|
|
gdk_backends = []
|
2017-03-20 11:44:42 +00:00
|
|
|
gdk_backends_gen_headers = [] # non-public generated headers
|
2020-04-23 23:36:46 +00:00
|
|
|
foreach backend : ['broadway', 'quartz', 'wayland', 'win32', 'x11', 'macos']
|
2017-03-20 00:37:09 +00:00
|
|
|
if get_variable('@0@_enabled'.format(backend))
|
|
|
|
subdir(backend)
|
|
|
|
gdk_deps += get_variable('gdk_@0@_deps'.format(backend))
|
|
|
|
gdk_backends += get_variable('libgdk_@0@'.format(backend))
|
2017-03-20 11:44:42 +00:00
|
|
|
# Special-case this for now to work around Meson bug with get_variable()
|
|
|
|
# fallback being an empty array, or any array (#1481)
|
|
|
|
if backend == 'wayland'
|
|
|
|
gdk_backends_gen_headers += get_variable('gdk_@0@_gen_headers'.format(backend))
|
|
|
|
endif
|
2017-03-20 00:37:09 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2018-02-27 18:42:28 +00:00
|
|
|
if gdk_backends.length() == 0
|
|
|
|
error('No backends enabled')
|
|
|
|
endif
|
|
|
|
|
2016-11-03 08:47:00 +00:00
|
|
|
libgdk = static_library('gdk',
|
2017-03-20 11:44:42 +00:00
|
|
|
sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig],
|
2019-04-06 00:40:29 +00:00
|
|
|
dependencies: gdk_deps + [libgtk_css_dep],
|
|
|
|
link_with: [libgtk_css, ],
|
2018-05-03 11:58:33 +00:00
|
|
|
include_directories: [confinc, gdkx11_inc, wlinc],
|
2020-07-18 00:57:17 +00:00
|
|
|
c_args: libgdk_c_args + common_cflags,
|
2017-04-28 21:41:50 +00:00
|
|
|
link_whole: gdk_backends,
|
2017-04-18 14:16:28 +00:00
|
|
|
link_args: common_ldflags)
|
2016-08-22 19:26:38 +00:00
|
|
|
|
2017-03-22 00:45:39 +00:00
|
|
|
# We don't have link_with: to internal static libs here on purpose, just
|
|
|
|
# list the dependencies and generated headers and such, for use in the
|
|
|
|
# "public" libgtk_dep used by internal executables.
|
2016-08-22 19:26:38 +00:00
|
|
|
libgdk_dep = declare_dependency(
|
2016-08-23 06:21:54 +00:00
|
|
|
sources: ['gdk.h', gdkconfig, gdkenum_h],
|
2018-05-03 11:58:33 +00:00
|
|
|
include_directories: [confinc, gdkx11_inc, wlinc],
|
2019-04-06 00:40:29 +00:00
|
|
|
dependencies: gdk_deps + [libgtk_css_dep])
|