meson: examples: update

Mostly style changes. Don't create resource source files
with spaces in them, that's tempting our luck.
This commit is contained in:
Tim-Philipp Müller 2017-03-12 20:13:10 +00:00 committed by Emmanuele Bassi
parent d276cd47a5
commit 3ac88fa6b6
13 changed files with 64 additions and 190 deletions
examples
application1
application10
application2
application3
application4
application5
application6
application7
application8
application9
bp
builder.cmeson.build

View File

@ -1,11 +1,3 @@
executable('exampleapp',
'exampleapp.c', 'exampleappwin.c', 'main.c',
app1 = executable( dependencies: libgtk_dep)
'exampleapp',
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
dependencies: libgtk_dep
)

View File

@ -1,23 +1,14 @@
app10_resources = gnome.compile_resources('exampleapp10 resources',
app10_resources = gnome.compile_resources(
'exampleapp10 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app10_schemas = gnome.compile_schemas() app10_schemas = gnome.compile_schemas()
executable('exampleapp10',
app10 = executable(
'exampleapp10',
'main.c', 'main.c',
'exampleapp.c', 'exampleapp.c',
'exampleapp.h',
'exampleappwin.c', 'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c', 'exampleappprefs.c',
'exampleappprefs.h',
app10_resources, app10_resources,
app10_schemas, app10_schemas,
dependencies: libgtk_dep dependencies: libgtk_dep)
)

View File

@ -1,17 +1,7 @@
app2_resources = gnome.compile_resources('exampleapp2_resources',
app2_resources = gnome.compile_resources(
'exampleapp2 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app2 = executable( executable('exampleapp2',
'exampleapp2', 'exampleapp.c', 'exampleappwin.c', 'main.c', app2_resources,
'main.c', dependencies: libgtk_dep)
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app2_resources,
dependencies: libgtk_dep
)

View File

@ -1,17 +1,7 @@
app3_resources = gnome.compile_resources('exampleapp3_resources',
app3_resources = gnome.compile_resources(
'exampleapp3 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app3 = executable( executable('exampleapp3',
'exampleapp3', 'exampleapp.c', 'exampleappwin.c', 'main.c', app3_resources,
'main.c', dependencies: libgtk_dep)
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app3_resources,
dependencies: libgtk_dep
)

View File

@ -1,17 +1,7 @@
app4_resources = gnome.compile_resources('exampleapp4_resources',
app4_resources = gnome.compile_resources(
'exampleapp4 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app4 = executable( executable('exampleapp4',
'exampleapp4', 'exampleapp.c', 'exampleappwin.c', 'main.c', app4_resources,
'main.c', dependencies: libgtk_dep)
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app4_resources,
dependencies: libgtk_dep
)

View File

@ -1,21 +1,9 @@
app5_resources = gnome.compile_resources('exampleapp5_resources',
app5_resources = gnome.compile_resources(
'exampleapp5 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app5_schemas = gnome.compile_schemas() app5_schemas = gnome.compile_schemas()
executable('exampleapp5',
app5 = executable( 'exampleapp.c', 'exampleappwin.c', 'main.c', app5_resources, app5_schemas,
'exampleapp5', dependencies: libgtk_dep)
'main.c',
'exampleapp.c',
'exampleapp.h',
'exampleappwin.c',
'exampleappwin.h',
app5_resources,
app5_schemas,
dependencies: libgtk_dep
)

View File

@ -1,23 +1,14 @@
app6_resources = gnome.compile_resources('exampleapp6_resources',
app6_resources = gnome.compile_resources(
'exampleapp6 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app6_schemas = gnome.compile_schemas() app6_schemas = gnome.compile_schemas()
executable('exampleapp6',
app6 = executable(
'exampleapp6',
'main.c',
'exampleapp.c', 'exampleapp.c',
'exampleapp.h',
'exampleappwin.c', 'exampleappwin.c',
'exampleappwin.h', 'main.c',
'exampleappprefs.c', 'exampleappprefs.c',
'exampleappprefs.h',
app6_resources, app6_resources,
app6_schemas, app6_schemas,
dependencies: libgtk_dep dependencies: libgtk_dep)
)

View File

@ -1,23 +1,14 @@
app7_resources = gnome.compile_resources('exampleapp7_resources',
app7_resources = gnome.compile_resources(
'exampleapp7 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app7_schemas = gnome.compile_schemas() app7_schemas = gnome.compile_schemas()
executable('exampleapp7',
app7 = executable(
'exampleapp7',
'main.c', 'main.c',
'exampleapp.c', 'exampleapp.c',
'exampleapp.h',
'exampleappwin.c', 'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c', 'exampleappprefs.c',
'exampleappprefs.h',
app7_resources, app7_resources,
app7_schemas, app7_schemas,
dependencies: libgtk_dep dependencies: libgtk_dep)
)

View File

@ -1,23 +1,14 @@
app8_resources = gnome.compile_resources('exampleapp8 resources',
app8_resources = gnome.compile_resources(
'exampleapp8 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app8_schemas = gnome.compile_schemas() app8_schemas = gnome.compile_schemas()
executable('exampleapp8',
app8 = executable(
'exampleapp8',
'main.c', 'main.c',
'exampleapp.c', 'exampleapp.c',
'exampleapp.h',
'exampleappwin.c', 'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c', 'exampleappprefs.c',
'exampleappprefs.h',
app8_resources, app8_resources,
app8_schemas, app8_schemas,
dependencies: libgtk_dep dependencies: libgtk_dep)
)

View File

@ -1,23 +1,14 @@
app9_resources = gnome.compile_resources('exampleapp9_resources',
app9_resources = gnome.compile_resources(
'exampleapp9 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.' source_dir: '.')
)
app9_schemas = gnome.compile_schemas() app9_schemas = gnome.compile_schemas()
executable('exampleapp9',
app9 = executable(
'exampleapp9',
'main.c', 'main.c',
'exampleapp.c', 'exampleapp.c',
'exampleapp.h',
'exampleappwin.c', 'exampleappwin.c',
'exampleappwin.h',
'exampleappprefs.c', 'exampleappprefs.c',
'exampleappprefs.h',
app9_resources, app9_resources,
app9_schemas, app9_schemas,
dependencies: libgtk_dep dependencies: libgtk_dep)
)

View File

@ -1,13 +1,5 @@
bp_resources = gnome.compile_resources('bloatpad_resources',
bp_resources = gnome.compile_resources(
'bloatpad resources',
'bloatpad.gresources.xml', 'bloatpad.gresources.xml',
source_dir: '.' source_dir: '.')
)
bloatpad = executable( executable('bloatpad', 'bloatpad.c', bp_resources, dependencies: libgtk_dep)
'bloatpad',
'bloatpad.c',
bp_resources,
dependencies: libgtk_dep
)

View File

@ -1,4 +1,5 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gstdio.h>
static void static void
print_hello (GtkWidget *widget, print_hello (GtkWidget *widget,
@ -15,6 +16,10 @@ main (int argc,
GObject *window; GObject *window;
GObject *button; GObject *button;
#ifdef GTK_SRCDIR
g_chdir (GTK_SRCDIR);
#endif
gtk_init (); gtk_init ();
/* Construct a GtkBuilder instance and load our UI description */ /* Construct a GtkBuilder instance and load our UI description */

View File

@ -1,51 +1,23 @@
builder_example = executable( examples = [
'builder_example', 'builder',
'builder.c',
dependencies: libgtk_dep
)
drawing = executable(
'drawing', 'drawing',
'drawing.c',
dependencies: libgtk_dep
)
grid_packing = executable(
'grid-packing', 'grid-packing',
'grid-packing.c',
dependencies: libgtk_dep
)
hello_world = executable(
'hello-world', 'hello-world',
'hello-world.c',
dependencies: libgtk_dep
)
plugman = executable(
'plugman', 'plugman',
'plugman.c',
dependencies: libgtk_dep
)
search_bar = executable(
'search-bar', 'search-bar',
'search-bar.c',
dependencies: libgtk_dep
)
sunny = executable(
'sunny', 'sunny',
'sunny.c',
dependencies: libgtk_dep
)
window_default = executable(
'window-default', 'window-default',
'window-default.c', ]
dependencies: libgtk_dep
)
foreach ex : examples
# TODO: name clash with testsuite/gtk/builder, rename one of the two
example_name = ex == 'builder' ? 'builder_example' : ex
executable(example_name, '@0@.c'.format(ex),
c_args : ['-DGDK_DISABLE_DEPRECATED',
'-DGTK_DISABLE_DEPRECATED',
'-DGTK_SRCDIR="@0@"'.format(meson.current_source_dir())],
dependencies: libgtk_dep)
endforeach
subdir('bp') subdir('bp')
subdir('application1') subdir('application1')