aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-27 10:52:41 +0200
committerThomas White <taw@physics.org>2020-08-27 10:52:41 +0200
commit6520cb697a87413e8f3ee22d5f5817261f7bf3ab (patch)
treedc93d5f269856278445cda883ad12507645462cd /meson.build
parentbeed39e09a3573380ee2cc0792b547c2f2d52852 (diff)
Build system parts for SLURM library
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build32
1 files changed, 21 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index 81719e20..bef509ff 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,10 @@ mdep = cc.find_library('m', required : true)
gsldep = dependency('gsl', required : true)
zlibdep = dependency('zlib', required : true)
pthreaddep = dependency('threads', required : true)
+slurmdep = cc.find_library('slurm', required : false)
+if slurmdep.found()
+ conf_data.set10('HAVE_SLURM', 1)
+endif
# HDF5 >= 1.8.21 and >= 1.10.2 has a pkg-config file:
hdf5dep = dependency('hdf5', language : 'c', required : false)
@@ -195,18 +199,24 @@ executable('make_pixelmap',
# CrystFEL GUI
if gtkdep.found()
- executable('crystfel',
- ['src/crystfel_gui.c',
- 'src/crystfelimageview.c',
- 'src/crystfelindexingopts.c',
- 'src/gui_peaksearch.c',
- 'src/gui_index.c',
- 'src/gui_backend_local.c',
- 'src/gui_backend_slurm.c',
- 'src/gui_project.c',
- versionc],
- dependencies : [mdep, libcrystfeldep, gtkdep, gsldep],
+
+ gui_sources = ['src/crystfel_gui.c',
+ 'src/crystfelimageview.c',
+ 'src/crystfelindexingopts.c',
+ 'src/gui_peaksearch.c',
+ 'src/gui_index.c',
+ 'src/gui_backend_local.c',
+ 'src/gui_project.c',
+ versionc]
+
+ if slurmdep.found()
+ gui_sources += 'src/gui_backend_slurm.c'
+ endif
+
+ executable('crystfel', gui_sources,
+ dependencies : [mdep, libcrystfeldep, gtkdep, gsldep, slurmdep],
install : true)
+
endif
# render_hkl