aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-27 14:44:06 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commitbb099d6c25a2868907b093053bd5205ac7bc8b94 (patch)
treea6704d9bcbf82ea58d2083c6977c58cd49ac76bf
parentbaa140938c9915842a526473d5bbde81cbcaae23 (diff)
Update Meson build files for dtempl branch
-rw-r--r--config.h.in1
-rw-r--r--libcrystfel/config.h.in12
-rw-r--r--libcrystfel/meson.build105
-rw-r--r--meson.build141
-rw-r--r--src/im-zmq.h2
5 files changed, 149 insertions, 112 deletions
diff --git a/config.h.in b/config.h.in
index c1cd0ecb..3d6bb9dd 100644
--- a/config.h.in
+++ b/config.h.in
@@ -10,7 +10,6 @@
#mesondefine HAVE_CLOCK_GETTIME
#mesondefine HAVE_MSGPACK
#mesondefine HAVE_ZMQ
-#mesondefine HAVE_FFTW
#define PACKAGE_VERSION "@CRYSTFEL_VERSION@"
diff --git a/libcrystfel/config.h.in b/libcrystfel/config.h.in
new file mode 100644
index 00000000..364f7060
--- /dev/null
+++ b/libcrystfel/config.h.in
@@ -0,0 +1,12 @@
+/* config.h for libcrystfel */
+
+#mesondefine HAVE_FFTW
+#mesondefine HAVE_XGANDALF
+#mesondefine HAVE_PINKINDEXER
+#mesondefine HAVE_FDIP
+#mesondefine HAVE_CURSES
+
+#mesondefine HAVE_FORKPTY_PTY_H
+#mesondefine HAVE_FORKPTY_UTIL_H
+
+#define CRYSTFEL_VERSIONSTRING "${CRYSTFEL_VERSION}"
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build
new file mode 100644
index 00000000..a7d946ce
--- /dev/null
+++ b/libcrystfel/meson.build
@@ -0,0 +1,105 @@
+# libcrystfel
+
+zlibdep = dependency('zlib', required : true)
+
+fftwdep = dependency('fftw3', required : false)
+if fftwdep.found()
+ conf_data.set10('HAVE_FFTW', 1)
+endif
+
+# FIXME: Curses, Xgandalf, pinkindexer, FDIP
+
+libcrystfel_includes = include_directories('src')
+
+# Find forkpty()
+utildep = cc.find_library('util', required : true)
+if cc.has_function('forkpty', dependencies : utildep, prefix : '#include <pty.h>')
+ add_project_arguments('-DHAVE_FORKPTY_PTY_H', language : 'c')
+elif cc.has_function('forkpty', dependencies : utildep, prefix : '#include <util.h>')
+ add_project_arguments('-DHAVE_FORKPTY_UTIL_H', language : 'c')
+else
+ error('Couldn\'t find forkpty()')
+endif
+
+
+# Symmetry operation parser Flex/Bison stuff
+flex = find_program('flex')
+bison = find_program('bison')
+
+flex_gen = generator(flex,
+ output : ['@BASENAME@-lex.c', '@BASENAME@-lex.h'],
+ arguments : ['--outfile=@OUTPUT0@',
+ '--header-file=@OUTPUT1@',
+ '@INPUT@'])
+
+bison_gen = generator(bison,
+ output : ['@BASENAME@-parse.c', '@BASENAME@-parse.h'],
+ arguments : ['--output=@OUTPUT0@',
+ '--defines=@OUTPUT1@',
+ '--report=all',
+ '@INPUT@'])
+
+symop_parse_ch = bison_gen.process('src/symop.y')
+symop_lex_ch = flex_gen.process('src/symop.l')
+
+
+libcrystfel_sources = ['src/image.c',
+ 'src/cell.c',
+ 'src/index.c',
+ 'src/spectrum.c',
+ 'src/cell-utils.c',
+ 'src/integer_matrix.c',
+ 'src/stream.c',
+ 'src/crystal.c',
+ 'src/integration.c',
+ 'src/symmetry.c',
+ 'src/mosflm.c',
+ 'src/taketwo.c',
+ 'src/dirax.c',
+ 'src/peakfinder8.c',
+ 'src/thread-pool.c',
+ 'src/peaks.c',
+ 'src/utils.c',
+ 'src/felix.c',
+ 'src/predict-refine.c',
+ 'src/xds.c',
+ 'src/filters.c',
+ 'src/rational.c',
+ 'src/xgandalf.c',
+ 'src/pinkindexer.c',
+ 'src/geometry.c',
+ 'src/reflist.c',
+ 'src/reflist-utils.c',
+ 'src/datatemplate.c',
+ 'src/colscale.c',
+ 'src/detgeom.c',
+ 'src/image-cbf.c',
+ 'src/image-hdf5.c',
+ 'src/image-msgpack.c',
+ symop_lex_ch,
+ symop_parse_ch,
+ ]
+
+if fftwdep.found()
+ libcrystfel_sources += 'src/asdf.c'
+endif
+
+configure_file(input : 'config.h.in',
+ output : 'config.h',
+ configuration : conf_data)
+
+libcrystfel_conf_inc = include_directories('.')
+
+libcrystfel = library('crystfel', libcrystfel_sources,
+ include_directories : [libcrystfel_includes, libcrystfel_conf_inc],
+ dependencies : [mdep, utildep, fftwdep, gsldep, zlibdep,
+ hdf5dep, pthreaddep],
+ install : true)
+
+libcrystfeldep = declare_dependency(include_directories : libcrystfel_includes,
+ link_with : libcrystfel)
+
+
+# FIXME: pkgconfig file
+# FIXME: API documents (Doxygen)
+# FIXME: install headers
diff --git a/meson.build b/meson.build
index ac9dbf3f..77aa5ed9 100644
--- a/meson.build
+++ b/meson.build
@@ -91,98 +91,17 @@ if cc.has_function('clock_gettime', prefix : '#include <time.h>')
conf_data.set10('HAVE_CLOCK_GETTIME', 1)
endif
-# FIXME: Curses, Xgandalf, pinkindexer, FDIP
+# ************************ libcrystfel (subdir) ************************
+subdir('libcrystfel')
-# libcrystfel
-libcrystfel_includes = include_directories('libcrystfel/src')
-
-# Find forkpty()
-utildep = cc.find_library('util', required : true)
-if cc.has_function('forkpty', dependencies : utildep, prefix : '#include <pty.h>')
- add_project_arguments('-DHAVE_FORKPTY_PTY_H', language : 'c')
-elif cc.has_function('forkpty', dependencies : utildep, prefix : '#include <util.h>')
- add_project_arguments('-DHAVE_FORKPTY_UTIL_H', language : 'c')
-else
- error('Couldn\'t find forkpty()')
-endif
-
-
-
-# Symmetry operation parser Flex/Bison stuff
-flex = find_program('flex')
-bison = find_program('bison')
-
-flex_gen = generator(flex,
- output : ['@BASENAME@-lex.c', '@BASENAME@-lex.h'],
- arguments : ['--outfile=@OUTPUT0@',
- '--header-file=@OUTPUT1@',
- '@INPUT@'])
-
-bison_gen = generator(bison,
- output : ['@BASENAME@-parse.c', '@BASENAME@-parse.h'],
- arguments : ['--output=@OUTPUT0@',
- '--defines=@OUTPUT1@',
- '--report=all',
- '@INPUT@'])
-
-symop_parse_ch = bison_gen.process('libcrystfel/src/symop.y')
-symop_lex_ch = flex_gen.process('libcrystfel/src/symop.l')
-
-
-libcrystfel_sources = ['libcrystfel/src/image.c',
- 'libcrystfel/src/render.c',
- 'libcrystfel/src/cell.c',
- 'libcrystfel/src/index.c',
- 'libcrystfel/src/spectrum.c',
- 'libcrystfel/src/cell-utils.c',
- 'libcrystfel/src/integer_matrix.c',
- 'libcrystfel/src/stream.c',
- 'libcrystfel/src/crystal.c',
- 'libcrystfel/src/integration.c',
- 'libcrystfel/src/symmetry.c',
- 'libcrystfel/src/detector.c',
- 'libcrystfel/src/mosflm.c',
- 'libcrystfel/src/taketwo.c',
- 'libcrystfel/src/dirax.c',
- 'libcrystfel/src/peakfinder8.c',
- 'libcrystfel/src/thread-pool.c',
- 'libcrystfel/src/events.c',
- 'libcrystfel/src/peaks.c',
- 'libcrystfel/src/utils.c',
- 'libcrystfel/src/felix.c',
- 'libcrystfel/src/predict-refine.c',
- 'libcrystfel/src/xds.c',
- 'libcrystfel/src/filters.c',
- 'libcrystfel/src/rational.c',
- 'libcrystfel/src/xgandalf.c',
- 'libcrystfel/src/geometry.c',
- 'libcrystfel/src/reflist.c',
- 'libcrystfel/src/hdf5-file.c',
- 'libcrystfel/src/reflist-utils.c',
- symop_lex_ch,
- symop_parse_ch,
- ]
-
-if fftwdep.found()
- libcrystfel_sources += 'libcrystfel/src/asdf.c'
-endif
+# ************************ The programs ************************
configure_file(input : 'config.h.in',
output : 'config.h',
configuration : conf_data)
conf_inc = include_directories('.')
-libcrystfel = library('crystfel', libcrystfel_sources,
- include_directories : [libcrystfel_includes, conf_inc],
- dependencies : [mdep, utildep, fftwdep, gsldep, zlibdep,
- hdf5dep, pthreaddep],
- install : true)
-
-libcrystfeldep = declare_dependency(include_directories : libcrystfel_includes,
- link_with : libcrystfel)
-
-
# cell_tool
executable('cell_tool',
['src/cell_tool.c'],
@@ -190,10 +109,11 @@ executable('cell_tool',
install : true)
# partial_sim
-executable('partial_sim',
- ['src/partial_sim.c'],
- dependencies : [mdep, libcrystfeldep, gsldep, pthreaddep],
- install : true)
+# FIXME: restore
+#executable('partial_sim',
+# ['src/partial_sim.c'],
+# dependencies : [mdep, libcrystfeldep, gsldep, pthreaddep],
+# install : true)
# process_hkl
executable('process_hkl',
@@ -266,18 +186,23 @@ executable('make_pixelmap',
install : true)
# geoptimiser
-executable('geoptimiser',
- ['src/geoptimiser.c', 'src/hdfsee-render.c'],
- dependencies : [mdep, libcrystfeldep, gsldep, gdkpixbufdep, gdkdep,
- tiffdep],
- install : true)
-
-# hdfsee
+# FIXME: restore
+#executable('geoptimiser',
+# ['src/geoptimiser.c', 'src/hdfsee-render.c'],
+# dependencies : [mdep, libcrystfeldep, gsldep, gdkpixbufdep, gdkdep,
+# tiffdep],
+# install : true)
+
+# CrystFEL GUI
if gtkdep.found()
- executable('hdfsee',
- ['src/hdfsee.c', 'src/dw-hdfsee.c', 'src/hdfsee-render.c'],
- dependencies : [mdep, libcrystfeldep, gtkdep, gsldep, gdkpixbufdep,
- tiffdep],
+ executable('crystfel',
+ ['src/crystfel_gui.c',
+ 'src/crystfelimageview.c',
+ 'src/gui_peaksearch.c',
+ 'src/gui_index.c',
+ 'src/gui_backend_local.c',
+ 'src/gui_project.c'],
+ dependencies : [mdep, libcrystfeldep, gtkdep, gsldep],
install : true)
endif
@@ -296,18 +221,16 @@ if gtkdep.found()
endif
# pattern_sim
-pattern_sim_sources = ['src/pattern_sim.c', 'src/diffraction.c']
-if opencldep.found()
- pattern_sim_sources += ['src/diffraction-gpu.c', 'src/cl-utils.c']
-endif
-executable('pattern_sim', pattern_sim_sources,
- dependencies : [mdep, libcrystfeldep, gsldep, hdf5dep, opencldep],
- install : true)
+# FIXME: restore
+#pattern_sim_sources = ['src/pattern_sim.c', 'src/diffraction.c']
+#if opencldep.found()
+# pattern_sim_sources += ['src/diffraction-gpu.c', 'src/cl-utils.c']
+#endif
+#executable('pattern_sim', pattern_sim_sources,
+# dependencies : [mdep, libcrystfeldep, gsldep, hdf5dep, opencldep],
+# install : true)
# FIXME: Install manual pages
-# FIXME: API documents (Doxygen)
-
# FIXME: Tests
-# FIXME: pkgconfig file
diff --git a/src/im-zmq.h b/src/im-zmq.h
index bbe5c6c8..50f59d04 100644
--- a/src/im-zmq.h
+++ b/src/im-zmq.h
@@ -36,8 +36,6 @@
#include <config.h>
#endif
-#include "image.h"
-
#if defined(HAVE_MSGPACK) && defined(HAVE_ZMQ)
#include <msgpack.h>