summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-03-12 16:54:44 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-03 15:10:53 +0100
commitb6722b0a36ead7cad70dac53303d85455799402f (patch)
tree517a41795aaa6b0fa0baa09d4cfcf437c47eca51 /demos
parentb8a017b08195e374bf9a376cfcd9ec8374a40cd6 (diff)
downloadgtk+-b6722b0a36ead7cad70dac53303d85455799402f.tar.gz
meson: demos: update and sync up with Makefiles
Diffstat (limited to 'demos')
-rw-r--r--demos/icon-browser/meson.build15
-rw-r--r--demos/meson.build6
-rw-r--r--demos/widget-factory/meson.build43
3 files changed, 40 insertions, 24 deletions
diff --git a/demos/icon-browser/meson.build b/demos/icon-browser/meson.build
index 661e5208c8..dd820eebce 100644
--- a/demos/icon-browser/meson.build
+++ b/demos/icon-browser/meson.build
@@ -5,18 +5,17 @@ iconbrowser_sources = [
'iconstore.c'
]
-iconbrowser_resources = gnome.compile_resources(
- 'iconbrowser_resources',
+iconbrowser_resources = gnome.compile_resources('iconbrowser_resources',
'iconbrowser.gresource.xml',
- source_dir: '.'
-)
+ source_dir: '.')
-iconbrowser = executable(
- 'gtk3-icon-browser',
+executable('gtk4-icon-browser',
iconbrowser_sources,
iconbrowser_resources,
dependencies: libgtk_dep,
include_directories : confinc,
gui_app: true,
- install: true
-)
+ install: true)
+
+install_data('gtk4-icon-browser.desktop',
+ install_dir : join_paths(get_option('datadir'), 'applications'))
diff --git a/demos/meson.build b/demos/meson.build
index 2fdd19151d..e45a7c8b4a 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -1,3 +1,3 @@
- subdir('icon-browser')
- subdir('widget-factory')
- subdir('gtk-demo')
+subdir('gtk-demo')
+subdir('icon-browser')
+subdir('widget-factory')
diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build
index 170a59e4bc..ab1f26a6c2 100644
--- a/demos/widget-factory/meson.build
+++ b/demos/widget-factory/meson.build
@@ -1,20 +1,37 @@
+# demos/widget-factory
-widgetfactory_sources = [
- 'widget-factory.c'
-]
-
-widgetfactory_resources = gnome.compile_resources(
- 'widgetfactory_resources',
+widgetfactory_resources = gnome.compile_resources('widgetfactory_resources',
'widget-factory.gresource.xml',
- source_dir: '.'
-)
+ source_dir: '.')
-widget_factory = executable(
- 'gtk3-widget-factory',
- widgetfactory_sources,
+executable('gtk4-widget-factory',
+ 'widget-factory.c',
widgetfactory_resources,
dependencies: libgtk_dep,
include_directories : confinc,
gui_app: true,
- install: true
-)
+ install: true)
+
+# desktop file
+
+install_data('gtk4-widget-factory.desktop',
+ install_dir : join_paths(get_option('datadir'), 'applications'))
+
+# icons
+
+icontheme_dir = join_paths(get_option('datadir'), 'icons/hicolor')
+
+foreach icon_size : ['16x16', '22x22', '24x24', '32x32', '48x48', '256x256']
+ icons_dir = join_paths(icontheme_dir, '@0@/apps'.format(icon_size))
+ install_data('data/@0@/gtk4-widget-factory.png'.format(icon_size),
+ install_dir : icons_dir)
+ install_data('data/@0@/gtk4-widget-factory-symbolic.symbolic.png'.format(icon_size),
+ install_dir : icons_dir)
+endforeach
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ meson.add_install_script(gtk_update_icon_cache.full_path(),
+ '--ignore-theme-index',
+ '--force',
+ icontheme_dir)
+endif