aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-08-25 11:32:47 +0200
committerThomas White <taw@physics.org>2022-08-25 11:32:47 +0200
commitd7079c3725df973d1444478881d8debfe39e065c (patch)
tree6a9b514f50af2e6db94047d3842c4ab2f1cd4702 /meson.build
parent7f2c2fb5a158b313804775ba431f0131914db1b6 (diff)
GUI: Get icons via a GResource
Otherwise we have to mess around with custom paths whenever CrystFEL is installed in a non-system location.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build20
1 files changed, 9 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index 3ca22532..bc4ccebb 100644
--- a/meson.build
+++ b/meson.build
@@ -35,6 +35,8 @@ if fftwdep.found()
conf_data.set10('HAVE_FFTW', true)
endif
+gnome = import('gnome')
+
gtkdep = dependency('gtk+-3.0', required: false)
if gtkdep.found()
add_project_arguments('-Wno-deprecated-declarations', language: 'c')
@@ -221,13 +223,18 @@ if gtkdep.found()
'src/gtkmultifilechooserbutton.c',
versionc]
- executable('crystfel', gui_sources,
+ gresources = gnome.compile_resources('crystfel-gui-resources',
+ 'data/crystfel.gresource.xml',
+ source_dir: 'data', c_name: 'crystfel')
+
+ executable('crystfel', gui_sources, gresources,
dependencies: [mdep, libcrystfeldep, gtkdep, gsldep],
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
install_data(['data/crystfel.desktop'],
install_dir: get_option('datadir') / 'applications')
+
endif
# render_hkl
@@ -267,16 +274,7 @@ simulation_bits = files(['src/diffraction.c',
# ************************ Misc resources ************************
-install_data(['data/crystfel.svg',
- 'data/crystfel-load-data.svg',
- 'data/crystfel-peak-detection.svg',
- 'data/crystfel-index-frame.svg',
- 'data/crystfel-index-all.svg',
- 'data/crystfel-unitcell.svg',
- 'data/crystfel-ambiguity.svg',
- 'data/crystfel-merge.svg',
- 'data/crystfel-fom.svg',
- 'data/crystfel-export.svg' ],
+install_data(['data/crystfel.svg'],
install_dir: get_option('datadir')+'/icons/hicolor/scalable/apps')