forked from AuroraMiddleware/gtk
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:
parent
d276cd47a5
commit
3ac88fa6b6
@ -1,11 +1,3 @@
|
||||
|
||||
|
||||
app1 = executable(
|
||||
'exampleapp',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('exampleapp',
|
||||
'exampleapp.c', 'exampleappwin.c', 'main.c',
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,23 +1,14 @@
|
||||
|
||||
app10_resources = gnome.compile_resources(
|
||||
'exampleapp10 resources',
|
||||
app10_resources = gnome.compile_resources('exampleapp10 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app10_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app10 = executable(
|
||||
'exampleapp10',
|
||||
executable('exampleapp10',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app10_resources,
|
||||
app10_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,17 +1,7 @@
|
||||
|
||||
app2_resources = gnome.compile_resources(
|
||||
'exampleapp2 resources',
|
||||
app2_resources = gnome.compile_resources('exampleapp2_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app2 = executable(
|
||||
'exampleapp2',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app2_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('exampleapp2',
|
||||
'exampleapp.c', 'exampleappwin.c', 'main.c', app2_resources,
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,17 +1,7 @@
|
||||
|
||||
app3_resources = gnome.compile_resources(
|
||||
'exampleapp3 resources',
|
||||
app3_resources = gnome.compile_resources('exampleapp3_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app3 = executable(
|
||||
'exampleapp3',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app3_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('exampleapp3',
|
||||
'exampleapp.c', 'exampleappwin.c', 'main.c', app3_resources,
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,17 +1,7 @@
|
||||
|
||||
app4_resources = gnome.compile_resources(
|
||||
'exampleapp4 resources',
|
||||
app4_resources = gnome.compile_resources('exampleapp4_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app4 = executable(
|
||||
'exampleapp4',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app4_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('exampleapp4',
|
||||
'exampleapp.c', 'exampleappwin.c', 'main.c', app4_resources,
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,21 +1,9 @@
|
||||
|
||||
app5_resources = gnome.compile_resources(
|
||||
'exampleapp5 resources',
|
||||
app5_resources = gnome.compile_resources('exampleapp5_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app5_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app5 = executable(
|
||||
'exampleapp5',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app5_resources,
|
||||
app5_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('exampleapp5',
|
||||
'exampleapp.c', 'exampleappwin.c', 'main.c', app5_resources, app5_schemas,
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,23 +1,14 @@
|
||||
|
||||
app6_resources = gnome.compile_resources(
|
||||
'exampleapp6 resources',
|
||||
app6_resources = gnome.compile_resources('exampleapp6_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app6_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app6 = executable(
|
||||
'exampleapp6',
|
||||
'main.c',
|
||||
executable('exampleapp6',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'main.c',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app6_resources,
|
||||
app6_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,23 +1,14 @@
|
||||
|
||||
app7_resources = gnome.compile_resources(
|
||||
'exampleapp7 resources',
|
||||
app7_resources = gnome.compile_resources('exampleapp7_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app7_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app7 = executable(
|
||||
'exampleapp7',
|
||||
executable('exampleapp7',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app7_resources,
|
||||
app7_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,23 +1,14 @@
|
||||
|
||||
app8_resources = gnome.compile_resources(
|
||||
'exampleapp8 resources',
|
||||
app8_resources = gnome.compile_resources('exampleapp8 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app8_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app8 = executable(
|
||||
'exampleapp8',
|
||||
executable('exampleapp8',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app8_resources,
|
||||
app8_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,23 +1,14 @@
|
||||
|
||||
app9_resources = gnome.compile_resources(
|
||||
'exampleapp9 resources',
|
||||
app9_resources = gnome.compile_resources('exampleapp9_resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
app9_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app9 = executable(
|
||||
'exampleapp9',
|
||||
executable('exampleapp9',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app9_resources,
|
||||
app9_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
dependencies: libgtk_dep)
|
||||
|
@ -1,13 +1,5 @@
|
||||
|
||||
bp_resources = gnome.compile_resources(
|
||||
'bloatpad resources',
|
||||
bp_resources = gnome.compile_resources('bloatpad_resources',
|
||||
'bloatpad.gresources.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
bloatpad = executable(
|
||||
'bloatpad',
|
||||
'bloatpad.c',
|
||||
bp_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
executable('bloatpad', 'bloatpad.c', bp_resources, dependencies: libgtk_dep)
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
static void
|
||||
print_hello (GtkWidget *widget,
|
||||
@ -15,6 +16,10 @@ main (int argc,
|
||||
GObject *window;
|
||||
GObject *button;
|
||||
|
||||
#ifdef GTK_SRCDIR
|
||||
g_chdir (GTK_SRCDIR);
|
||||
#endif
|
||||
|
||||
gtk_init ();
|
||||
|
||||
/* Construct a GtkBuilder instance and load our UI description */
|
||||
|
@ -1,51 +1,23 @@
|
||||
builder_example = executable(
|
||||
'builder_example',
|
||||
'builder.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
drawing = executable(
|
||||
examples = [
|
||||
'builder',
|
||||
'drawing',
|
||||
'drawing.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
grid_packing = executable(
|
||||
'grid-packing',
|
||||
'grid-packing.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
hello_world = executable(
|
||||
'hello-world',
|
||||
'hello-world.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
plugman = executable(
|
||||
'plugman',
|
||||
'plugman.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
search_bar = executable(
|
||||
'search-bar',
|
||||
'search-bar.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
sunny = executable(
|
||||
'sunny',
|
||||
'sunny.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
window_default = executable(
|
||||
'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('application1')
|
||||
|
Loading…
Reference in New Issue
Block a user