mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
meson: gtk-demo: update and sync up with Makefile.am
This commit is contained in:
parent
37d5938561
commit
d6a824476d
@ -1,6 +1,5 @@
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
# 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',
|
||||
@ -25,6 +24,7 @@ demos = files([
|
||||
'event_axes.c',
|
||||
'expander.c',
|
||||
'filtermodel.c',
|
||||
'fishbowl.c',
|
||||
'foreigndrawing.c',
|
||||
'gestures.c',
|
||||
'glarea.c',
|
||||
@ -59,6 +59,7 @@ demos = files([
|
||||
'spinbutton.c',
|
||||
'spinner.c',
|
||||
'stack.c',
|
||||
'tabs.c',
|
||||
'textmask.c',
|
||||
'textview.c',
|
||||
'textscroll.c',
|
||||
@ -68,7 +69,6 @@ demos = files([
|
||||
'tree_store.c',
|
||||
])
|
||||
|
||||
|
||||
gtkdemo_deps = [libgtk_dep]
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
@ -80,32 +80,62 @@ if os_unix
|
||||
demos += files('pagesetup.c')
|
||||
endif
|
||||
|
||||
gtkdemo_sources = demos + files([
|
||||
'main.c',
|
||||
])
|
||||
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@'])
|
||||
|
||||
geninclude = find_program('geninclude.py')
|
||||
demos_h = custom_target(
|
||||
'gtk3 demo header',
|
||||
output : 'demos.h',
|
||||
input : demos,
|
||||
command : [geninclude, '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
gtkdemo_resources = gnome.compile_resources(
|
||||
'gtkdemo_resources',
|
||||
gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
||||
'demo.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
source_dir: '.')
|
||||
|
||||
gtkdemo = executable(
|
||||
'gtk3-demo',
|
||||
gtkdemo_sources,
|
||||
demos_h,
|
||||
gtkdemo_resources,
|
||||
dependencies: gtkdemo_deps,
|
||||
executable('gtk4-demo',
|
||||
'main.c', 'gtkfishbowl.c', demos, demos_h, gtkdemo_resources,
|
||||
c_args : gtkdemo_args,
|
||||
dependencies : gtkdemo_deps,
|
||||
include_directories : confinc,
|
||||
gui_app: true,
|
||||
install: true
|
||||
)
|
||||
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(get_option('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
|
||||
|
||||
# FIXME: check if there are ordering guarantees, i.e. this is actually run
|
||||
# only after all the icons have been installed.
|
||||
# TODO: uninstall script, once we have an uninstall target (Meson issue)
|
||||
# TODO: should we be able to pass a locally-built exe here? (Meson issue)
|
||||
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
|
||||
|
||||
# desktop file
|
||||
|
||||
install_data('gtk4-demo.desktop',
|
||||
install_dir : join_paths(get_option('datadir'), 'applications'))
|
||||
|
||||
# GSettings
|
||||
|
||||
install_data('org.gtk.Demo.gschema.xml',
|
||||
install_dir : join_paths(get_option('datadir'), 'glib-2.0/schemas/'))
|
||||
|
Loading…
Reference in New Issue
Block a user