summaryrefslogtreecommitdiff
path: root/demos/gtk-demo/meson.build
blob: ae1bf7e79f2893a33ffae66d2bb275723fabf8e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# These should be in the order you want them to appear in the
# demo app, which means alphabetized by demo title, not filename
demos = files([
  'application_demo.c',
  'assistant.c',
  'builder.c',
  'button_box.c',
  'changedisplay.c',
  'clipboard.c',
  'colorsel.c',
  'combobox.c',
  'css_accordion.c',
  'css_basics.c',
  'css_blendmodes.c',
  'css_multiplebgs.c',
  'css_pixbufs.c',
  'css_shadows.c',
  'cursors.c',
  'dialog.c',
  'drawingarea.c',
  'dnd.c',
  'editable_cells.c',
  'entry_buffer.c',
  'entry_completion.c',
  'event_axes.c',
  'expander.c',
  'filtermodel.c',
  'fishbowl.c',
  'widgetbowl.c',
  'foreigndrawing.c',
  'gestures.c',
  'glarea.c',
  'headerbar.c',
  'hypertext.c',
  'iconview.c',
  'iconview_edit.c',
  'images.c',
  'infobar.c',
  'links.c',
  'listbox.c',
  'flowbox.c',
  'list_store.c',
  'markup.c',
  'menus.c',
  'modelbutton.c',
  'overlay.c',
  'overlay2.c',
  'paint.c',
  'panes.c',
  'pickers.c',
  'pixbufs.c',
  'popover.c',
  'printing.c',
  'revealer.c',
  'rotated_text.c',
  'scale.c',
  'search_entry.c',
  'search_entry2.c',
  'shortcuts.c',
  'sidebar.c',
  'sizegroup.c',
  'spinbutton.c',
  'spinner.c',
  'stack.c',
  'tabs.c',
  'textmask.c',
  'textview.c',
  'textscroll.c',
  'theming_style_classes.c',
  'toolpalette.c',
  'transparent.c',
  'tree_store.c',
])

gtkdemo_deps = [ libgtk_dep, ]

if harfbuzz_dep.found() and pangoft_dep.found()
  demos += files('font_features.c')
  gtkdemo_deps += [ harfbuzz_dep, ]
endif

if os_unix
  demos += files('pagesetup.c')
endif

gtkdemo_args = [ '-DGDK_DISABLE_DEPRECATED', '-DGTK_DISABLE_DEPRECATED', ]

demos_h = custom_target('gtk4 demo header',
                        output: 'demos.h',
                        input: demos,
                        command: [ find_program('geninclude.py'), '@OUTPUT@', '@INPUT@' ])

gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
                                            'demo.gresource.xml',
                                            source_dir: '.')

executable('gtk4-demo',
           'main.c', 'gtkfishbowl.c', 'fontplane.c', 'script-names.c', 'language-names.c',
                   'gtkgears.c',
                   demos, demos_h, gtkdemo_resources,
           c_args: gtkdemo_args,
           dependencies: gtkdemo_deps,
           include_directories: confinc,
           gui_app: true,
           install: true)

executable('gtk4-demo-application',
           'application.c', gtkdemo_resources,
           c_args: gtkdemo_args,
           dependencies: gtkdemo_deps,
           include_directories: confinc,
           gui_app: true,
           install: true)

# icons
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')

foreach icon_size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', ]
  gtk_demo_icons_dir = join_paths(icontheme_dir, '@0@/apps'.format(icon_size))
  install_data('data/@0@/gtk4-demo.png'.format(icon_size),
               install_dir: gtk_demo_icons_dir)
  install_data('data/@0@/gtk4-demo-symbolic.symbolic.png'.format(icon_size),
               install_dir: gtk_demo_icons_dir)
endforeach

# desktop file
install_data('gtk4-demo.desktop', install_dir: gtk_applicationsdir)

# GSettings
install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir)
gnome.compile_schemas()