forked from AuroraMiddleware/gtk
417 lines
9.5 KiB
Meson
417 lines
9.5 KiB
Meson
gdk_sources = files([
|
|
'gdk-private.c',
|
|
'gdk.c',
|
|
'gdkapplaunchcontext.c',
|
|
'gdkcairo.c',
|
|
'gdkcursor.c',
|
|
'gdkdeprecated.c',
|
|
'gdkdevice.c',
|
|
'gdkdevicemanager.c',
|
|
'gdkdevicepad.c',
|
|
'gdkdevicetool.c',
|
|
'gdkdisplay.c',
|
|
'gdkdisplaymanager.c',
|
|
'gdkdnd.c',
|
|
'gdkdrawingcontext.c',
|
|
'gdkevents.c',
|
|
'gdkframeclock.c',
|
|
'gdkframeclockidle.c',
|
|
'gdkframetimings.c',
|
|
'gdkgl.c',
|
|
'gdkglcontext.c',
|
|
'gdkglobals.c',
|
|
'gdkkeys.c',
|
|
'gdkkeyuni.c',
|
|
'gdkmonitor.c',
|
|
'gdkpango.c',
|
|
'gdkpixbuf-drawable.c',
|
|
'gdkproperty.c',
|
|
'gdkrectangle.c',
|
|
'gdkrgba.c',
|
|
'gdkscreen.c',
|
|
'gdkseat.c',
|
|
'gdkseatdefault.c',
|
|
'gdkselection.c',
|
|
'gdkvisual.c',
|
|
'gdkwindow.c',
|
|
'gdkwindowimpl.c',
|
|
])
|
|
|
|
gdk_public_h_sources = files([
|
|
'gdk-autocleanup.h',
|
|
'gdk.h',
|
|
'gdkapplaunchcontext.h',
|
|
'gdkcairo.h',
|
|
'gdkcursor.h',
|
|
'gdkdevice.h',
|
|
'gdkdevicemanager.h',
|
|
'gdkdevicepad.h',
|
|
'gdkdevicetool.h',
|
|
'gdkdisplay.h',
|
|
'gdkdisplaymanager.h',
|
|
'gdkdnd.h',
|
|
'gdkdrawingcontext.h',
|
|
'gdkevents.h',
|
|
'gdkframeclock.h',
|
|
'gdkframetimings.h',
|
|
'gdkglcontext.h',
|
|
'gdkkeys.h',
|
|
'gdkkeysyms.h',
|
|
'gdkmain.h',
|
|
'gdkmonitor.h',
|
|
'gdkpango.h',
|
|
'gdkpixbuf.h',
|
|
'gdkprivate.h',
|
|
'gdkproperty.h',
|
|
'gdkrectangle.h',
|
|
'gdkrgba.h',
|
|
'gdkscreen.h',
|
|
'gdkseat.h',
|
|
'gdkselection.h',
|
|
'gdktestutils.h',
|
|
'gdkthreads.h',
|
|
'gdktypes.h',
|
|
'gdkvisual.h',
|
|
'gdkwindow.h',
|
|
])
|
|
|
|
gdk_private_h_sources = files([
|
|
'gdkdevicetoolprivate.h',
|
|
'gdkdrawingcontextprivate.h',
|
|
'gdkmonitorprivate.h',
|
|
'gdkprivate.h',
|
|
'gdkseatdefaultprivate.h',
|
|
])
|
|
|
|
gdk_x_sources = files([
|
|
'x11/MwmUtil.h',
|
|
'x11/gdkapplaunchcontext-x11.c',
|
|
'x11/gdkasync.c',
|
|
'x11/gdkasync.h',
|
|
'x11/gdkcursor-x11.c',
|
|
'x11/gdkdevice-core-x11.c',
|
|
'x11/gdkdevice-xi2.c',
|
|
'x11/gdkdevicemanager-core-x11.c',
|
|
'x11/gdkdevicemanager-x11.c',
|
|
'x11/gdkdevicemanager-xi2.c',
|
|
'x11/gdkdisplay-x11.c',
|
|
'x11/gdkdisplay-x11.h',
|
|
'x11/gdkdisplaymanager-x11.c',
|
|
'x11/gdkdnd-x11.c',
|
|
'x11/gdkeventsource.c',
|
|
'x11/gdkeventsource.h',
|
|
'x11/gdkeventtranslator.c',
|
|
'x11/gdkeventtranslator.h',
|
|
'x11/gdkgeometry-x11.c',
|
|
'x11/gdkglcontext-x11.c',
|
|
'x11/gdkglcontext-x11.h',
|
|
'x11/gdkkeys-x11.c',
|
|
'x11/gdkmain-x11.c',
|
|
'x11/gdkmonitor-x11.c',
|
|
'x11/gdkmonitor-x11.h',
|
|
'x11/gdkproperty-x11.c',
|
|
'x11/gdkscreen-x11.c',
|
|
'x11/gdkscreen-x11.h',
|
|
'x11/gdkselection-x11.c',
|
|
'x11/gdktestutils-x11.c',
|
|
'x11/gdkvisual-x11.c',
|
|
'x11/gdkwindow-x11.c',
|
|
'x11/gdkwindow-x11.h',
|
|
'x11/gdkx.h',
|
|
'x11/gdkx11monitor.h',
|
|
'x11/gdkxftdefaults.c',
|
|
'x11/gdkxid.c',
|
|
'x11/xsettings-client.c',
|
|
'x11/xsettings-client.h',
|
|
])
|
|
|
|
gdk_x_private_sources = files([
|
|
'x11/gdkdevicemanagerprivate-core.h',
|
|
'x11/gdkprivate-x11.h',
|
|
])
|
|
|
|
gdk_x_public_headers = files([
|
|
'x11/gdkx-autocleanups.h',
|
|
'x11/gdkx11applaunchcontext.h',
|
|
'x11/gdkx11cursor.h',
|
|
'x11/gdkx11device-core.h',
|
|
'x11/gdkx11device-xi2.h',
|
|
'x11/gdkx11device.h',
|
|
'x11/gdkx11devicemanager-core.h',
|
|
'x11/gdkx11devicemanager-xi2.h',
|
|
'x11/gdkx11devicemanager.h',
|
|
'x11/gdkx11display.h',
|
|
'x11/gdkx11displaymanager.h',
|
|
'x11/gdkx11dnd.h',
|
|
'x11/gdkx11glcontext.h',
|
|
'x11/gdkx11keys.h',
|
|
'x11/gdkx11monitor.h',
|
|
'x11/gdkx11property.h',
|
|
'x11/gdkx11screen.h',
|
|
'x11/gdkx11selection.h',
|
|
'x11/gdkx11utils.h',
|
|
'x11/gdkx11visual.h',
|
|
'x11/gdkx11window.h',
|
|
])
|
|
|
|
gdk_wayland_sources = files([
|
|
'wayland/gdkapplaunchcontext-wayland.c',
|
|
'wayland/gdkcursor-wayland.c',
|
|
'wayland/gdkdevice-wayland.c',
|
|
'wayland/gdkdisplay-wayland.c',
|
|
'wayland/gdkdisplay-wayland.h',
|
|
'wayland/gdkdnd-wayland.c',
|
|
'wayland/gdkeventsource.c',
|
|
'wayland/gdkglcontext-wayland.c',
|
|
'wayland/gdkglcontext-wayland.h',
|
|
'wayland/gdkkeys-wayland.c',
|
|
'wayland/gdkmonitor-wayland.c',
|
|
'wayland/gdkmonitor-wayland.h',
|
|
'wayland/gdkscreen-wayland.c',
|
|
'wayland/gdkseat-wayland.h',
|
|
'wayland/gdkselection-wayland.c',
|
|
'wayland/gdkwayland.h',
|
|
'wayland/gdkwaylanddevice.h',
|
|
'wayland/gdkwaylanddisplay.h',
|
|
'wayland/gdkwaylandglcontext.h',
|
|
'wayland/gdkwaylandmonitor.h',
|
|
'wayland/gdkwaylandselection.h',
|
|
'wayland/gdkwaylandwindow.h',
|
|
'wayland/gdkwindow-wayland.c',
|
|
'wayland/wm-button-layout-translation.c',
|
|
])
|
|
|
|
gdk_wayland_public_headers = files([
|
|
'wayland/gdkwaylanddevice.h',
|
|
'wayland/gdkwaylanddisplay.h',
|
|
'wayland/gdkwaylandglcontext.h',
|
|
'wayland/gdkwaylandselection.h',
|
|
'wayland/gdkwaylandwindow.h'
|
|
])
|
|
|
|
gdk_wayland_private_sources = files([
|
|
'wayland/gdkprivate-wayland.h',
|
|
])
|
|
|
|
|
|
|
|
gdk_broadway_sources = files([
|
|
'broadway/broadway-buffer.c',
|
|
'broadway/broadway-buffer.h',
|
|
'broadway/broadway-output.c',
|
|
'broadway/broadway-output.h',
|
|
'broadway/broadway-server.c',
|
|
'broadway/broadway-server.h',
|
|
'broadway/broadwayd.c',
|
|
'broadway/gdkbroadway-server.c',
|
|
'broadway/gdkcursor-broadway.c',
|
|
'broadway/gdkdevice-broadway.c',
|
|
'broadway/gdkdevice-broadway.h',
|
|
'broadway/gdkdevicemanager-broadway.c',
|
|
'broadway/gdkdevicemanager-broadway.h',
|
|
'broadway/gdkdisplay-broadway.c',
|
|
'broadway/gdkdisplay-broadway.h',
|
|
'broadway/gdkdnd-broadway.c',
|
|
'broadway/gdkeventsource.c',
|
|
'broadway/gdkeventsource.h',
|
|
'broadway/gdkglobals-broadway.c',
|
|
'broadway/gdkkeys-broadway.c',
|
|
'broadway/gdkmonitor-broadway.c',
|
|
'broadway/gdkmonitor-broadway.h',
|
|
'broadway/gdkproperty-broadway.c',
|
|
'broadway/gdkscreen-broadway.c',
|
|
'broadway/gdkscreen-broadway.h',
|
|
'broadway/gdkselection-broadway.c',
|
|
'broadway/gdktestutils-broadway.c',
|
|
'broadway/gdkvisual-broadway.c',
|
|
'broadway/gdkwindow-broadway.c',
|
|
'broadway/gdkwindow-broadway.h',
|
|
])
|
|
|
|
gdk_broadway_private_sources = files([
|
|
'broadway/gdkprivate-broadway.h'
|
|
])
|
|
|
|
# glsl_sources = [
|
|
# 'gl3-texture-2d.fs.glsl',
|
|
# 'gl3-texture-2d.vs.glsl',
|
|
# 'gl3-texture-rect.fs.glsl',
|
|
# 'gl3-texture-rect.vs.glsl',
|
|
# 'gl2-texture-2d.fs.glsl',
|
|
# 'gl2-texture-2d.fs.glsl',
|
|
# 'gl2-texture-rect.vs.glsl',
|
|
# 'gl2-texture-rect.vs.glsl',
|
|
# 'gles2-texture.fs.glsl',
|
|
# 'gles2-texture.vs.glsl',
|
|
# ]
|
|
# resource_xml = ''
|
|
# foreach glsl_file : glsl_sources
|
|
# resource_xml += ' <file alias="glsl/@0@">resources/glsl/@0@</file>\n'.format(glsl_file)
|
|
# endforeach
|
|
|
|
|
|
# cdata = configuration_data()
|
|
# cdata.set('GDK_GRESOURCE_XML_FILES', resource_xml)
|
|
# gdkresources_xml = configure_file(
|
|
# input : 'gdk.gresource.xml.meson',
|
|
# output : 'gdk.gresource.xml',
|
|
# configuration : cdata
|
|
# )
|
|
|
|
gdkresources = gnome.compile_resources(
|
|
'gdkresources',
|
|
'gdk.gresource.xml',
|
|
source_dir: '.',
|
|
c_name: '_gdk',
|
|
extra_args: '--manual-register'
|
|
)
|
|
|
|
|
|
gdk_headers = gdk_public_h_sources + gdk_private_h_sources
|
|
|
|
gdkenum_h = custom_target(
|
|
'gdkenum_h',
|
|
output : 'gdkenumtypes.h',
|
|
input : gdk_headers,
|
|
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.h.template', '@OUTPUT@', '@INPUT@'])
|
|
|
|
gdkenum_c = custom_target(
|
|
'gdkenum_c',
|
|
output : 'gdkenumtypes.c',
|
|
input : gdk_headers,
|
|
depends : gdkenum_h,
|
|
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.c.template', '@OUTPUT@', '@INPUT@'])
|
|
|
|
gdkmarshal_h = custom_target(
|
|
'gdkmarshal_h',
|
|
output : 'gdkmarshalers.h',
|
|
input : 'gdkmarshalers.list',
|
|
command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
|
|
)
|
|
|
|
gdkmarshal_c = custom_target(
|
|
'gdkmarshal_c',
|
|
output : 'gdkmarshalers.c',
|
|
input : 'gdkmarshalers.list',
|
|
command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
|
|
)
|
|
|
|
cdata = configuration_data()
|
|
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
|
|
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
|
|
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
|
|
|
|
|
|
|
|
if x11_enabled cdata.set('GDK_WINDOWING_X11', '') endif
|
|
if wayland_enabled cdata.set('GDK_WINDOWING_WAYLAND', '') endif
|
|
if broadway_enabled cdata.set('GDK_WINDOWING_BROADWAY', '') endif
|
|
gdkconfig = configure_file(
|
|
input : 'gdkconfig.h.meson',
|
|
output : 'gdkconfig.h',
|
|
configuration : cdata,
|
|
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
|
|
)
|
|
|
|
gdkversionmacros = configure_file(
|
|
input : 'gdkversionmacros.h.in',
|
|
output : 'gdkversionmacros.h',
|
|
configuration: cdata,
|
|
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
|
|
)
|
|
|
|
xinc = include_directories('x11')
|
|
wlinc = include_directories('.')
|
|
|
|
|
|
gdk_deps = [
|
|
mlib,
|
|
pixbuf_dep,
|
|
cairo_dep,
|
|
pango_dep,
|
|
cairogobj_dep,
|
|
glib_dep,
|
|
epoxy_dep,
|
|
fontconfig_dep,
|
|
giounix_dep,
|
|
pangocairo_dep
|
|
]
|
|
|
|
gdk_sources = [
|
|
gdkconfig,
|
|
gdk_sources,
|
|
gdkenum_c, gdkenum_h,
|
|
gdkmarshal_c, gdkmarshal_h,
|
|
gdkresources,
|
|
gdkversionmacros,
|
|
gdk_headers
|
|
]
|
|
|
|
if x11_enabled
|
|
gdk_deps += [
|
|
xrender_dep,
|
|
xi_dep,
|
|
xext_dep,
|
|
x11_dep,
|
|
xcursor_dep,
|
|
xdamage_dep,
|
|
xfixes_dep,
|
|
xcomposite_dep,
|
|
xrandr_dep
|
|
]
|
|
gdk_sources += [
|
|
gdk_x_sources,
|
|
gdk_x_private_sources
|
|
]
|
|
|
|
# install_headers(gdk_x_public_headers, subdir: 'gtk-3.0/gdk/x11/')
|
|
endif
|
|
|
|
if wayland_enabled
|
|
subdir('wayland')
|
|
gdk_deps += [
|
|
shmlib,
|
|
xkbdep,
|
|
wlclientdep,
|
|
wlprotocolsdep,
|
|
wlcursordep,
|
|
wlegldep
|
|
]
|
|
gdk_sources += [
|
|
gdk_wayland_sources,
|
|
gdk_wayland_private_sources
|
|
]
|
|
|
|
# install_headers(gdk_wayland_public_headers, subdir: 'gtk-3.0/gdk/wayland/')
|
|
endif
|
|
|
|
if broadway_enabled
|
|
gdk_deps += [
|
|
shmlib,
|
|
]
|
|
gdk_sources += [
|
|
gdk_broadway_sources,
|
|
gdk_broadway_private_sources
|
|
]
|
|
endif
|
|
|
|
|
|
# install_headers(gdk_public_h_sources, subdir: 'gtk-3.0/gdk/')
|
|
|
|
libgdk = static_library('gdk',
|
|
sources: [gdk_sources, gdkconfig, gdkenum_h],
|
|
c_args: ['-DHAVE_CONFIG_H', '-DGDK_COMPILATION'],
|
|
include_directories: [confinc, xinc, wlinc],
|
|
dependencies: gdk_deps,
|
|
)
|
|
|
|
|
|
libgdk_dep = declare_dependency(
|
|
sources: ['gdk.h', gdkconfig, gdkenum_h],
|
|
depends: gdk_sources,
|
|
include_directories: [confinc, xinc, wlinc],
|
|
dependencies: gdk_deps,
|
|
link_with: libgdk,
|
|
link_args: ['-Bsymbolic'],
|
|
)
|