meson: update build files

This commit is contained in:
Timm Bäder 2016-11-03 09:47:00 +01:00 committed by Emmanuele Bassi
parent 409ed21594
commit 4fcca9945f
11 changed files with 118 additions and 162 deletions

View File

@ -41,8 +41,6 @@ demos = files([
'markup.c',
'menus.c',
'modelbutton.c',
'offscreen_window.c',
'offscreen_window2.c',
'overlay.c',
'overlay2.c',
'panes.c',

View File

@ -23,7 +23,6 @@ gdk_sources = files([
'gdkkeys.c',
'gdkkeyuni.c',
'gdkmonitor.c',
'gdkoffscreenwindow.c',
'gdkpango.c',
'gdkpixbuf-drawable.c',
'gdkproperty.c',
@ -268,10 +267,7 @@ gdkresources = gnome.compile_resources(
)
deprecated_gdk_sources = ['deprecated/gdkcolor.c']
deprecated_h_sources = files(['deprecated/gdkcolor.h'])
gdk_headers = gdk_public_h_sources + deprecated_h_sources + gdk_private_h_sources
gdk_headers = gdk_public_h_sources + gdk_private_h_sources
gdkenum_h = custom_target(
'gdkenum_h',
@ -314,14 +310,14 @@ gdkconfig = configure_file(
input : 'gdkconfig.h.meson',
output : 'gdkconfig.h',
configuration : cdata,
install_dir: 'include/gtk-3.0/gdk/' # XXX ???
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
)
gdkversionmacros = configure_file(
input : 'gdkversionmacros.h.in',
output : 'gdkversionmacros.h',
configuration: cdata,
install_dir: 'include/gtk-3.0/gdk/' # XXX ???
install_dir: 'include/gtk-4.0/gdk/' # XXX ???
)
xinc = include_directories('x11')
@ -344,7 +340,6 @@ gdk_deps = [
gdk_sources = [
gdkconfig,
gdk_sources,
deprecated_gdk_sources,
gdkenum_c, gdkenum_h,
gdkmarshal_c, gdkmarshal_h,
gdkresources,
@ -369,7 +364,7 @@ if x11_enabled
gdk_x_private_sources
]
install_headers(gdk_x_public_headers, subdir: 'gtk-3.0/gdk/x11/')
# install_headers(gdk_x_public_headers, subdir: 'gtk-3.0/gdk/x11/')
endif
if wayland_enabled
@ -387,7 +382,7 @@ if wayland_enabled
gdk_wayland_private_sources
]
install_headers(gdk_wayland_public_headers, subdir: 'gtk-3.0/gdk/wayland/')
# install_headers(gdk_wayland_public_headers, subdir: 'gtk-3.0/gdk/wayland/')
endif
if broadway_enabled
@ -401,15 +396,13 @@ if broadway_enabled
endif
install_headers(gdk_public_h_sources, subdir: 'gtk-3.0/gdk/')
install_headers(deprecated_h_sources, subdir: 'gtk-3.0/gdk/deprecated/')
# install_headers(gdk_public_h_sources, subdir: 'gtk-3.0/gdk/')
libgdk = shared_library('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,
install: true
)

15
gsk/gsk.resources.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
<gresource prefix='/org/gtk/libgsk'>
<file alias='glsl/blend.fs.glsl'>resources/glsl/blend.fs.glsl</file>
<file alias='glsl/blend.vs.glsl'>resources/glsl/blend.vs.glsl</file>
<file alias='glsl/blit.fs.glsl'>resources/glsl/blit.fs.glsl</file>
<file alias='glsl/blit.vs.glsl'>resources/glsl/blit.vs.glsl</file>
<file alias='glsl/es2_common.fs.glsl'>resources/glsl/es2_common.fs.glsl</file>
<file alias='glsl/es2_common.vs.glsl'>resources/glsl/es2_common.vs.glsl</file>
<file alias='glsl/gl3_common.fs.glsl'>resources/glsl/gl3_common.fs.glsl</file>
<file alias='glsl/gl3_common.vs.glsl'>resources/glsl/gl3_common.vs.glsl</file>
<file alias='glsl/gl_common.fs.glsl'>resources/glsl/gl_common.fs.glsl</file>
<file alias='glsl/gl_common.vs.glsl'>resources/glsl/gl_common.vs.glsl</file>
</gresource>
</gresources>

77
gsk/meson.build Normal file
View File

@ -0,0 +1,77 @@
gsk_sources = files([
'gskrenderer.c',
'gskrendernode.c',
'gskrendernodeiter.c',
'gskcairorenderer.c',
'gskdebug.c',
'gskgldriver.c',
'gskglprofiler.c',
'gskglrenderer.c',
'gskprivate.c',
'gskprofiler.c',
'gskshaderbuilder.c',
])
gsk_headers = files([
'gskenums.h',
'gskrenderer.h',
'gskrendernode.h',
'gskrendernodeiter.h',
'gsktypes.h',
'gskcairorendererprivate.h',
'gskdebugprivate.h',
'gskgldriverprivate.h',
'gskglprofilerprivate.h',
'gskglrendererprivate.h',
'gskprivate.h',
'gskprofilerprivate.h',
'gskrendererprivate.h',
'gskrendernodeprivate.h',
'gskshaderbuilderprivate.h',
])
gskenum_h = custom_target(
'gskenum_h',
output : 'gskenumtypes.h',
input : gsk_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gskenumtypes.h.template', '@OUTPUT@', '@INPUT@'])
gskenum_c = custom_target(
'gskenum_c',
output : 'gskenumtypes.c',
input : gsk_headers,
depends : gskenum_h,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gskenumtypes.c.template', '@OUTPUT@', '@INPUT@'])
gskresources = gnome.compile_resources(
'gskresources',
'gsk.resources.xml',
source_dir: '.',
c_name: '_gsk',
extra_args: '--manual-register'
)
gsk_deps = [
graphene_dep,
pango_dep,
cairo_dep,
pixbuf_dep,
libgdk_dep,
]
libgsk = static_library(
'gsk',
sources: [gsk_sources, gskenum_h, gskresources],
dependencies: gsk_deps,
include_directories: [confinc],
c_args: ['-DGSK_COMPILATION'],
)
libgsk_dep = declare_dependency(
depends: gsk_sources,
link_with: libgsk,
link_args: ['-Bsymbolic'],
include_directories: [confinc],
sources: [gskenum_h, gskresources]
)

View File

@ -1,8 +1,6 @@
a11y_sources = files([
'gtkaccessibility.c',
'gtkaccessibilitymisc.c',
'gtkaccessibilityutil.c',
'gtkarrowaccessible.c',
'gtkbooleancellaccessible.c',
'gtkbuttonaccessible.c',
'gtkcellaccessible.c',
@ -58,7 +56,6 @@ a11y_sources = files([
a11y_headers = files([
'gtk-a11y-autocleanups.h',
'gtkarrowaccessible.h',
'gtkbooleancellaccessible.h',
'gtkbuttonaccessible.h',
'gtkcellaccessible.h',

View File

@ -1,85 +1,9 @@
gtk_deprecated_sources = files(
'gtkaction.c',
'gtkactiongroup.c',
'gtkactivatable.c',
'gtkalignment.c',
'gtkarrow.c',
'gtkcolorsel.c',
'gtkcolorseldialog.c',
'gtkfontsel.c',
'gtkgradient.c',
'gtkhandlebox.c',
'gtkhbbox.c',
'gtkhbox.c',
'gtkhpaned.c',
'gtkhscale.c',
'gtkhscrollbar.c',
'gtkhseparator.c',
'gtkhsv.c',
'gtkiconfactory.c',
'gtkimagemenuitem.c',
'gtkmisc.c',
'gtknumerableicon.c',
'gtkradioaction.c',
'gtkrc.c',
'gtkrecentaction.c',
'gtkstatusicon.c',
'gtkstock.c',
'gtkstyle.c',
'gtkstyleproperties.c',
'gtksymboliccolor.c',
'gtktable.c',
'gtktearoffmenuitem.c',
'gtkthemingengine.c',
'gtktoggleaction.c',
'gtkuimanager.c',
'gtkvbbox.c',
'gtkvbox.c',
'gtkvpaned.c',
'gtkvscale.c',
'gtkvscrollbar.c',
'gtkvseparator.c',
)
gtk_deprecated_headers = files([
'gtkaction.h',
'gtkactiongroup.h',
'gtkactivatable.h',
'gtkalignment.h',
'gtkarrow.h',
'gtkcolorsel.h',
'gtkcolorseldialog.h',
'gtkfontsel.h',
'gtkgradient.h',
'gtkhandlebox.h',
'gtkhbbox.h',
'gtkhbox.h',
'gtkhpaned.h',
'gtkhscale.h',
'gtkhscrollbar.h',
'gtkhseparator.h',
'gtkhsv.h',
'gtkiconfactory.h',
'gtkimagemenuitem.h',
'gtkmisc.h',
'gtknumerableicon.h',
'gtkradioaction.h',
'gtkrc.h',
'gtkrecentaction.h',
'gtkstatusicon.h',
'gtkstock.h',
'gtkstyle.h',
'gtkstyleproperties.h',
'gtksymboliccolor.h',
'gtktable.h',
'gtktearoffmenuitem.h',
'gtkthemingengine.h',
'gtktoggleaction.h',
'gtkuimanager.h',
'gtkvbbox.h',
'gtkvbox.h',
'gtkvpaned.h',
'gtkvscale.h',
'gtkvscrollbar.h',
'gtkvseparator.h',
])

View File

@ -181,7 +181,7 @@ gtk_test_register_all_types (void)
GType *tp;
all_registered_types = g_new0 (GType, max_gtk_types);
tp = all_registered_types;
#include "gtktypefuncs.c"
#include <gtktypefuncs.c>
n_all_registered_types = tp - all_registered_types;
g_assert (n_all_registered_types + 1 < max_gtk_types);
*tp = 0;

View File

@ -85,10 +85,8 @@ gtk_sources = files([
'gtkcsscolorvalue.c',
'gtkcsscornervalue.c',
'gtkcsscustomgadget.c',
'gtkcsscustomproperty.c',
'gtkcssdimensionvalue.c',
'gtkcsseasevalue.c',
'gtkcssenginevalue.c',
'gtkcssenumvalue.c',
'gtkcssgadget.c',
'gtkcssiconthemevalue.c',
@ -139,7 +137,6 @@ gtk_sources = files([
'gtkcsstransformvalue.c',
'gtkcsstransientnode.c',
'gtkcsstransition.c',
'gtkcsstypedvalue.c',
'gtkcsstypes.c',
'gtkcssunsetvalue.c',
'gtkcssvalue.c',
@ -229,12 +226,10 @@ gtk_sources = files([
'gtkmnemonichash.c',
'gtkmodelbutton.c',
'gtkmodelmenuitem.c',
'gtkmodifierstyle.c',
'gtkmodules.c',
'gtkmountoperation.c',
'gtknativedialog.c',
'gtknotebook.c',
'gtkoffscreenwindow.c',
'gtkorientable.c',
'gtkoverlay.c',
'gtkpadcontroller.c',
@ -243,7 +238,6 @@ gtk_sources = files([
'gtkpango.c',
'gtkpapersize.c',
'gtkpathbar.c',
'gtkpixelcache.c',
'gtkplacessidebar.c',
'gtkplacesview.c',
'gtkplacesviewrow.c',
@ -505,7 +499,6 @@ gtk_public_headers = files([
'gtkmountoperation.h',
'gtknativedialog.h',
'gtknotebook.h',
'gtkoffscreenwindow.h',
'gtkorientable.h',
'gtkoverlay.h',
'gtkpadcontroller.h',
@ -513,7 +506,6 @@ gtk_public_headers = files([
'gtkpaned.h',
'gtkpapersize.h',
'gtkplacessidebar.h',
'gtkplug.h',
'gtkpopover.h',
'gtkpopovermenu.h',
'gtkprintcontext.h',
@ -553,7 +545,6 @@ gtk_public_headers = files([
'gtkshow.h',
'gtksizegroup.h',
'gtksizerequest.h',
'gtksocket.h',
'gtkspinbutton.h',
'gtkspinner.h',
'gtkstack.h',
@ -600,8 +591,6 @@ gtk_public_headers = files([
'gtkwidgetpath.h',
'gtkwindow.h',
'gtkwindowgroup.h',
'gtkx-autocleanups.h',
'gtkx.h',
])
gtk_unix_sources = files([
@ -627,10 +616,6 @@ gtkresources = gnome.compile_resources(
)
gtk_x11_sources = files([
'gtkplug.c',
'gtksocket.c',
'gtkxembed.c',
'deprecated/gtktrayicon-x11.c',
'gtkapplication-x11.c',
'gtkmountoperation-x11.c',
])
@ -672,7 +657,7 @@ gtktypebuiltins_h = custom_target(
input : gtk_public_headers + gtk_deprecated_headers,
command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtktypebuiltins.h.template', '@OUTPUT@', '@INPUT@'],
install: true,
install_dir: 'include/gtk-3.0/gtk/' # XXX ???
install_dir: 'include/gtk-4.0/gtk/' # XXX ???
)
gtktypebuiltins_c = custom_target(
@ -720,7 +705,7 @@ gtkversion = configure_file(
input : 'gtkversion.h.in',
output : 'gtkversion.h',
configuration: cdata,
install_dir: 'include/gtk-3.0/gtk/' # XXX ???
install_dir: 'include/gtk-4.0/gtk/' # XXX ???
)
gtk_cargs = [
@ -761,6 +746,7 @@ gtk_deps = [
atk_dep,
epoxy_dep,
mlib,
graphene_dep
]
if x11_enabled
@ -793,16 +779,15 @@ gnome.compile_schemas()
# Install necessary headers
install_headers(gtk_public_headers, subdir: 'gtk-3.0/gtk/')
install_headers(gtk_deprecated_headers, subdir: 'gtk-3.0/gtk/deprecated/')
install_headers(a11y_headers, subdir: 'gtk-3.0/gtk/a11y/')
# install_headers(gtk_public_headers, subdir: 'gtk-3.0/gtk/')
# install_headers(gtk_deprecated_headers, subdir: 'gtk-3.0/gtk/deprecated/')
# install_headers(a11y_headers, subdir: 'gtk-3.0/gtk/a11y/')
libgtk = shared_library('gtk',
gtk_sources,
gtkmarshal_h,
sources: [typefuncs, gtk_sources, gtkmarshal_h],
c_args: gtk_cargs,
include_directories: [confinc, gdkinc, gtkinc],
dependencies: [gtk_deps, libgdk_dep],
dependencies: [gtk_deps, libgdk_dep, libgsk_dep],
install: true
)
@ -814,30 +799,30 @@ libgtk_dep = declare_dependency(
gtktypebuiltins_h,
],
dependencies: gtk_deps,
link_with: [libgtk, libgdk],
link_with: [libgtk, libgdk, libgsk],
link_args: ['-Bsymbolic'],
include_directories: [confinc, gtkinc]
include_directories: [confinc, gtkinc, gdkinc]
)
####### Utils ######
gtk_query_settings = executable(
'gtk-query-settings',
'gtk4-query-settings',
'gtk-query-settings.c',
dependencies: libgtk_dep,
install: true
)
gtk_builder_tool = executable(
'gtk-builder-tool',
'gtk4-builder-tool',
'gtk-builder-tool.c',
dependencies: libgtk_dep,
install: true
)
gtk_update_icon_cache = executable(
'gtk-update-icon-cache',
'gtk4-update-icon-cache',
'updateiconcache.c',
dependencies: libgtk_dep,
install: true
@ -852,14 +837,14 @@ gtk_update_icon_cache = executable(
# )
gtk_encode_symbolic_svg = executable(
'gtk-encode-symbolic-svg',
'gtk4-encode-symbolic-svg',
'encodesymbolic.c',
dependencies: libgtk_dep,
install: true
)
gtk_launch = executable(
'gtk-launch',
'gtk4-launch',
'gtk-launch.c',
dependencies: libgtk_dep,
install: true

View File

@ -1,5 +1,5 @@
project('gtk+-3.0', 'c',
version: '3.22.0',
version: '3.90.0',
default_options: [
'buildtype=debugoptimized',
'c_std=gnu89',
@ -150,7 +150,6 @@ foreach f : check_functions
endif
endforeach
#
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.
@ -181,6 +180,7 @@ colord_dep = dependency('colord', version: '>= 0.1.9', required: false)
fontconfig_dep = dependency('fontconfig')
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
xkbdep = dependency('xkbcommon', version: '>= 0.2.0')
graphene_dep = dependency('graphene-1.0')
if wayland_enabled
wlclientdep = dependency('wayland-client', version: '>= 1.9.91')
@ -259,6 +259,7 @@ configure_file(
)
subdir('gdk')
subdir('gsk')
subdir('gtk')
subdir('demos')
subdir('tests')

View File

@ -41,12 +41,6 @@ test_print = executable('testprint',
dependencies: libgtk_dep
)
test_offscren = executable('testoffscreen',
'testoffscreen.c',
'gtkoffscreenbox.c',
'gtkoffscreenbox.h',
dependencies: libgtk_dep
)
test_gdkgears = executable('gdkgears',
'gdkgears.c',
'gtkgears.c',
@ -66,8 +60,6 @@ test_entryicons = executable('testentryicons', 'testentryicons.c', dependencies:
test_filechooser = executable('testfilechooser', 'testfilechooser.c', dependencies: libgtk_dep)
test_filechooserbutton = executable('testfilechooserbutton', 'testfilechooserbutton.c', dependencies: libgtk_dep)
test_flowbox = executable('testflowbox', 'testflowbox.c', dependencies: libgtk_dep)
test_fontselection = executable('testfontselection', 'testfontselection.c', dependencies: libgtk_dep)
test_fontselectiondialog = executable('testfontselectiondialog', 'testfontselectiondialog.c', dependencies: libgtk_dep)
test_fontchooser = executable('testfontchooser', 'testfontchooser.c', dependencies: libgtk_dep)
test_fontoptions = executable('testfontoptions', 'testfontoptions.c', dependencies: libgtk_dep)
test_grid = executable('testgrid', 'testgrid.c', dependencies: libgtk_dep)
@ -87,18 +79,13 @@ test_toolbar = executable('testtoolbar', 'testtoolbar.c', dependencies: libgtk_d
test_toolbar2 = executable('testtoolbar2', 'testtoolbar2.c', dependencies: libgtk_dep)
test_menubutton = executable('testmenubutton', 'testmenubutton.c', dependencies: libgtk_dep)
test_spinbutton = executable('testspinbutton', 'testspinbutton.c', dependencies: libgtk_dep)
test_statusicon = executable('teststatusicon', 'teststatusicon.c', dependencies: libgtk_dep)
test_merge = executable('testmerge', 'testmerge.c', dependencies: libgtk_dep)
test_actions = executable('testactions', 'testactions.c', dependencies: libgtk_dep)
test_baseline = executable('testbaseline', 'testbaseline.c', dependencies: libgtk_dep)
test_bbox = executable('testbbox', 'testbbox.c', dependencies: libgtk_dep)
test_buttons = executable('testbuttons', 'testbuttons.c', dependencies: libgtk_dep)
test_frame = executable('testframe', 'testframe.c', dependencies: libgtk_dep)
test_geometry = executable('testgeometry', 'testgeometry.c', dependencies: libgtk_dep)
test_giconpixbuf = executable('testgiconpixbuf', 'testgiconpixbuf.c', dependencies: libgtk_dep)
test_iconview = executable('testiconview', 'testiconview.c', dependencies: libgtk_dep)
test_iconview_keynav = executable('testiconview_keynav', 'testiconview-keynav.c', dependencies: libgtk_dep)
test_numerableicon = executable('testnumerableicon', 'testnumerableicon.c', dependencies: libgtk_dep)
test_recentchooser = executable('testrecentchooser', 'testrecentchooser.c', dependencies: libgtk_dep)
test_grouping = executable('testgrouping', 'testgrouping.c', dependencies: libgtk_dep)
test_tooltips = executable('testtooltips', 'testtooltips.c', dependencies: libgtk_dep)
@ -107,11 +94,9 @@ test_volumebutton = executable('testvolumebutton', 'testvolumebutton.c', depende
test_scrolledwindow = executable('testscrolledwindow', 'testscrolledwindow.c', dependencies: libgtk_dep)
test_cellarea = executable('testcellarea', 'testcellarea.c', dependencies: libgtk_dep)
test_treemenu = executable('testtreemenu', 'testtreemenu.c', dependencies: libgtk_dep)
test_offscreenwindow = executable('testoffscreenwindow', 'testoffscreenwindow.c', dependencies: libgtk_dep)
test_overlay = executable('testoverlay', 'testoverlay.c', dependencies: libgtk_dep)
test_overlaystyleclass = executable('testoverlaystyleclass', 'testoverlaystyleclass.c', dependencies: libgtk_dep)
test_appchooser = executable('testappchooser', 'testappchooser.c', dependencies: libgtk_dep)
test_windows = executable('testwindows', 'testwindows.c', dependencies: libgtk_dep)
test_expand = executable('testexpand', 'testexpand.c', dependencies: libgtk_dep)
test_expander = executable('testexpander', 'testexpander.c', dependencies: libgtk_dep)
test_switch = executable('testswitch', 'testswitch.c', dependencies: libgtk_dep)
@ -175,7 +160,6 @@ test_richtext = executable('testrichtext', 'testrichtext.c', dependencies: libgt
test_scale = executable('testscale', 'testscale.c', dependencies: libgtk_dep)
test_selection = executable('testselection', 'testselection.c', dependencies: libgtk_dep)
test_selectionmode = executable('testselectionmode', 'testselectionmode.c', dependencies: libgtk_dep)
test_stockbuttonmenu = executable('teststockbuttonmenu', 'teststockbuttonmenu.c', dependencies: libgtk_dep)
test_stresstest_toolbar = executable('stresstest-oolbar', 'stresstest-toolbar.c', dependencies: libgtk_dep)
test_verticalcells = executable('testverticalcells', 'testverticalcells.c', dependencies: libgtk_dep)
test_treestoretest = executable('treestoretest', 'treestoretest.c', dependencies: libgtk_dep)
@ -191,20 +175,6 @@ test_actionbar = executable('testactionbar', 'testactionbar.c', dependencies: li
test_popup = executable('testpopup', 'testpopup.c', dependencies: libgtk_dep)
test_popupat = executable('testpopupat', 'testpopupat.c', dependencies: libgtk_dep)
# Conditionally compiled tests
if x11_enabled
test_socket = executable('testsocket',
'testsocket.c',
'testsocket_common.c',
dependencies: libgtk_dep
)
test_socket_child = executable('testsocket_child',
'testsocket_child.c',
'testsocket_common.c',
dependencies: libgtk_dep
)
endif
if os_linux
test_fontchooserdialog = executable('testfontchooserdialog', 'testfontchooserdialog.c', dependencies: libgtk_dep)
endif

View File

@ -4,10 +4,6 @@ test('gtk/accel test', test_accel)
test_accessible = executable('accessible', 'accessible.c', dependencies: libgtk_dep)
test('gtk/accessible test', test_accessible)
test_action = executable('action', 'action.c', dependencies: libgtk_dep)
test('gtk/action test', test_action)
test_adjustment = executable('adjustment', 'adjustment.c', dependencies: libgtk_dep)
test('gtk/adjustment test', test_adjustment)