Debian Codegraph @

demos/gtk-demo/meson.build

raw
1 # These should be in the order you want them to appear in the
2 # demo app, which means alphabetized by demo title, not filename
3 demos = files([
4 'application_demo.c',
5 'aspect_frame.c',
6 'assistant.c',
7 'builder.c',
8 'clipboard.c',
9 'combobox.c',
10 'constraints.c',
11 'constraints_interactive.c',
12 'constraints_vfl.c',
13 'constraints_builder.c',
14 'css_accordion.c',
15 'css_basics.c',
16 'css_blendmodes.c',
17 'css_multiplebgs.c',
18 'css_pixbufs.c',
19 'css_shadows.c',
20 'cursors.c',
21 'dialog.c',
22 'dnd.c',
23 'drawingarea.c',
24 'editable_cells.c',
25 'entry_completion.c',
26 'entry_undo.c',
27 'errorstates.c',
28 'expander.c',
29 'filtermodel.c',
30 'fishbowl.c',
31 'fixed.c',
32 'fixed2.c',
33 'flowbox.c',
34 'fontrendering.c',
35 'font_features.c',
36 'frames.c',
37 'gears.c',
38 'gestures.c',
39 'glarea.c',
40 'headerbar.c',
41 'hypertext.c',
42 'iconscroll.c',
43 'iconview.c',
44 'iconview_edit.c',
45 'image_filtering.c',
46 'image_scaling.c',
47 'images.c',
48 'infobar.c',
49 'layoutmanager.c',
50 'layoutmanager2.c',
51 'links.c',
52 'listbox.c',
53 'listbox_controls.c',
54 'list_store.c',
55 'listview_applauncher.c',
56 'listview_clocks.c',
57 'listview_colors.c',
58 'listview_filebrowser.c',
59 'listview_minesweeper.c',
60 'listview_selections.c',
61 'listview_settings.c',
62 'listview_settings2.c',
63 'listview_ucd.c',
64 'listview_weather.c',
65 'listview_words.c',
66 'markup.c',
67 'mask.c',
68 'overlay.c',
69 'overlay_decorative.c',
70 'paint.c',
71 'paintable.c',
72 'paintable_animated.c',
73 'paintable_emblem.c',
74 'paintable_mediastream.c',
75 'paintable_svg.c',
76 'paintable_symbolic.c',
77 'panes.c',
78 'password_entry.c',
79 'path_explorer_demo.c',
80 'path_fill.c',
81 'path_maze.c',
82 'path_spinner.c',
83 'path_sweep.c',
84 'path_text.c',
85 'path_walk.c',
86 'peg_solitaire.c',
87 'pickers.c',
88 'printing.c',
89 'read_more.c',
90 'revealer.c',
91 'rotated_text.c',
92 'scale.c',
93 'search_entry.c',
94 'shadertoy.c',
95 'shortcuts.c',
96 'shortcut_triggers.c',
97 'sidebar.c',
98 'sizegroup.c',
99 'sliding_puzzle.c',
100 'spinbutton.c',
101 'spinner.c',
102 'stack.c',
103 'tabs.c',
104 'tagged_entry.c',
105 'textmask.c',
106 'textundo.c',
107 'textview.c',
108 'textscroll.c',
109 'themes.c',
110 'theming_style_classes.c',
111 'transparent.c',
112 'tree_store.c',
113 'video_player.c',
114 ])
115
116 gtkdemo_deps = [ libgtk_dep, gmodule_headers_dep ]
117
118 extra_demo_sources = files([
119 'demochild.c',
120 'demoimage.c',
121 'demolayout.c',
122 'demotaggedentry.c',
123 'demowidget.c',
124 'demo2layout.c',
125 'demo2widget.c',
126 'demo4widget.c',
127 'filter_paintable.c',
128 'fontify.c',
129 'fontplane.c',
130 'four_point_transform.c',
131 'graphwidget.c',
132 'gtkfishbowl.c',
133 'gtkshadertoy.c',
134 'gtkgears.c',
135 'hsla.c',
136 'imageview.c',
137 'language-names.c',
138 'main.c',
139 'nodewidget.c',
140 'path_explorer.c',
141 'pixbufpaintable.c',
142 'puzzlepiece.c',
143 'range-editor.c',
144 'script-names.c',
145 'settings-key.c',
146 'singular_value_decomposition.c',
147 'suggestionentry.c',
148 'unicode-names.c',
149 'component_filter.c',
150 'minigraph.c',
151 ])
152
153 if os_unix
154 demos += files('pagesetup.c')
155 endif
156
157 demos_h = custom_target('gtk4 demo header',
158 output: 'demos.h',
159 input: demos,
160 command: [ find_program('geninclude.py'), '@OUTPUT@', '@INPUT@' ],
161 )
162
163 gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
164 'demo.gresource.xml',
165 source_dir: meson.current_source_dir()
166 )
167
168 # Use a subset of compiler flags
169 demo_cflags = []
170 foreach flag: common_cflags
171 if flag not in ['-Werror=missing-prototypes', '-Wmissing-prototypes',
172 '-Werror=missing-declarations', '-Wmissing-declarations']
173 demo_cflags += flag
174 endif
175 endforeach
176
177 demo_cflags += [ '-DGTK_COMPILATION=1' ]
178
179 gtkdemo_deps += [ profile_conf_h ]
180
181 executable('gtk4-demo',
182 sources: [demos, demos_h, extra_demo_sources, gtkdemo_resources],
183 c_args: demo_cflags,
184 dependencies: gtkdemo_deps,
185 include_directories: confinc,
186 win_subsystem: 'windows',
187 link_args: extra_demo_ldflags,
188 install: true,
189 kwargs: demo_kwargs
190 )
191
192 executable('gtk4-demo-application',
193 sources: ['application.c', gtkdemo_resources],
194 c_args: common_cflags,
195 dependencies: gtkdemo_deps,
196 include_directories: confinc,
197 win_subsystem: 'windows',
198 link_args: extra_demo_ldflags,
199 install: true,
200 )
201
202 # icons
203 icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
204
205 foreach size: ['scalable', 'symbolic']
206 install_subdir('data/' + size, install_dir: icontheme_dir)
207 endforeach
208
209 # desktop file
210 install_data('org.gtk.Demo4.desktop', install_dir: gtk_applicationsdir)
211
212 # GSettings
213 install_data('org.gtk.Demo4.gschema.xml', install_dir: gtk_schemasdir)
214 gnome.compile_schemas()
215
216 # appdata
217 configure_file(
218 input: 'org.gtk.Demo4.appdata.xml.in',
219 output: 'org.gtk.Demo4.appdata.xml',
220 configuration: appdata_config,
221 install_dir: gtk_appdatadir
222 )
223
224 if bash.found()
225 install_data([ 'completion' ],
226 rename: [ 'gtk4-demo' ],
227 install_dir: bash_comp_inst_dir,
228 install_tag: 'bin',
229 )
230 endif