diff options
-rw-r--r-- | libcrystfel/meson.build | 60 | ||||
-rw-r--r-- | meson.build | 128 |
2 files changed, 95 insertions, 93 deletions
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index 07d7b9f4..e5246789 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -1,13 +1,13 @@ # libcrystfel -zlibdep = dependency('zlib', required : true) +zlibdep = dependency('zlib', required: true) if cc.has_function('gzbuffer', prefix: '#include <zlib.h>', dependencies: zlibdep) conf_data.set10('HAVE_GZBUFFER', 1) endif -fftwdep = dependency('fftw3', required : false) +fftwdep = dependency('fftw3', required: false) if fftwdep.found() conf_data.set10('HAVE_FFTW', 1) endif @@ -37,7 +37,7 @@ if ccp4dep.found() conf_data.set10('HAVE_LIBCCP4', 1) endif -msgpackdep = dependency('msgpack', required : false) +msgpackdep = dependency('msgpack', required: false) if msgpackdep.found() conf_data.set10('HAVE_MSGPACK', 1) endif @@ -50,10 +50,10 @@ libcrystfel_versionc = vcs_tag(input: 'src/libcrystfel-version.c.in', 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>') +utildep = cc.find_library('util', required: true) +if cc.has_function('forkpty', dependencies: utildep, prefix: '#include <pty.h>') conf_data.set10('HAVE_FORKPTY_PTY_H', 1) -elif cc.has_function('forkpty', dependencies : utildep, prefix : '#include <util.h>') +elif cc.has_function('forkpty', dependencies: utildep, prefix: '#include <util.h>') conf_data.set10('HAVE_FORKPTY_UTIL_H', 1) else error('Couldn\'t find forkpty()') @@ -65,17 +65,17 @@ 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@']) + 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@']) + 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') @@ -118,25 +118,25 @@ libcrystfel_sources = ['src/image.c', 'src/indexers/pinkindexer.c', 'src/indexers/fromfile.c', symop_lex_ch, - symop_parse_ch, - ] + symop_parse_ch] -configure_file(input : 'libcrystfel-config.h.meson.in', - output : 'libcrystfel-config.h', - configuration : conf_data) +configure_file(input: 'libcrystfel-config.h.meson.in', + output: 'libcrystfel-config.h', + configuration: conf_data) libcrystfel_conf_inc = include_directories('.') libcrystfel = library('crystfel', [libcrystfel_sources, libcrystfel_versionc], - include_directories : [libcrystfel_includes, libcrystfel_conf_inc], - dependencies : [mdep, utildep, fftwdep, gsldep, zlibdep, - hdf5dep, pthreaddep, ncursesdep, - xgandalfdep, pinkindexerdep, fdipdep, - ccp4dep, msgpackdep], - install : true) - -libcrystfeldep = declare_dependency(include_directories : libcrystfel_includes, - link_with : libcrystfel, + include_directories: [libcrystfel_includes, + libcrystfel_conf_inc], + dependencies: [mdep, utildep, fftwdep, gsldep, zlibdep, + hdf5dep, pthreaddep, ncursesdep, + xgandalfdep, pinkindexerdep, fdipdep, + ccp4dep, msgpackdep], + install: true) + +libcrystfeldep = declare_dependency(include_directories: libcrystfel_includes, + link_with: libcrystfel, dependencies: gsldep) @@ -187,7 +187,7 @@ if doxygen.found() configuration: doc_data, install: false) - api_docs = run_target('api-docs', command : [doxygen, doxyfile]) + api_docs = run_target('api-docs', command: [doxygen, doxyfile]) endif diff --git a/meson.build b/meson.build index f07df9b6..b2a1f3fd 100644 --- a/meson.build +++ b/meson.build @@ -1,11 +1,11 @@ # Meson file for CrystFEL project('crystfel', 'c', - version : '0.9.1', - license : 'GPL3+', - meson_version : '>=0.50.0', - default_options : ['buildtype=debugoptimized']) + version: '0.9.1', + license: 'GPL3+', + meson_version: '>=0.50.0', + default_options: ['buildtype=debugoptimized']) -add_project_arguments('-DHAVE_CONFIG_H', language : 'c') +add_project_arguments('-DHAVE_CONFIG_H', language: 'c') versionc = vcs_tag(input: 'src/version.c.in', output: 'version.c') @@ -15,15 +15,15 @@ conf_data = configuration_data() # Mandatory dependencies cc = meson.get_compiler('c') -mdep = cc.find_library('m', required : true) -gsldep = dependency('gsl', required : true) -zlibdep = dependency('zlib', required : true) -pthreaddep = dependency('threads', required : true) +mdep = cc.find_library('m', required: true) +gsldep = dependency('gsl', required: true) +zlibdep = dependency('zlib', required: true) +pthreaddep = dependency('threads', required: true) # Try via pkg-config first: -slurmdep = dependency('slurm', required : false) +slurmdep = dependency('slurm', required: false) if not slurmdep.found() - slurmdep = cc.find_library('slurm', required : false) + slurmdep = cc.find_library('slurm', required: false) endif if slurmdep.found() @@ -31,40 +31,40 @@ if slurmdep.found() endif # Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0 -hdf5dep = dependency('hdf5', language : 'c', required : true) +hdf5dep = dependency('hdf5', language: 'c', required: true) # Request HDF5 1.10-style API -add_project_arguments('-DH5_USE_110_API', language : 'c') -add_project_arguments('-DH5O_GET_INFO_BY_IDX1', language : 'c') +add_project_arguments('-DH5_USE_110_API', language: 'c') +add_project_arguments('-DH5O_GET_INFO_BY_IDX1', language: 'c') # "Optional" dependencies -fftwdep = dependency('fftw3', required : false) +fftwdep = dependency('fftw3', required: false) if fftwdep.found() conf_data.set10('HAVE_FFTW', 1) endif -gtkdep = dependency('gtk+-3.0', required : false) +gtkdep = dependency('gtk+-3.0', required: false) if gtkdep.found() - add_project_arguments('-Wno-deprecated-declarations', language : 'c') + add_project_arguments('-Wno-deprecated-declarations', language: 'c') conf_data.set10('HAVE_GTK', 1) endif -gdkdep = dependency('gdk-3.0', required : false) +gdkdep = dependency('gdk-3.0', required: false) if gdkdep.found() conf_data.set10('HAVE_GDK', 1) endif -gdkpixbufdep = dependency('gdk-pixbuf-2.0', required : false) +gdkpixbufdep = dependency('gdk-pixbuf-2.0', required: false) if gdkpixbufdep.found() conf_data.set10('HAVE_GDKPIXBUF', 1) endif -cairodep = dependency('cairo', required : false) +cairodep = dependency('cairo', required: false) if cairodep.found() conf_data.set10('HAVE_CAIRO', 1) endif -opencldep = dependency('OpenCL', required : false) +opencldep = dependency('OpenCL', required: false) if opencldep.found() conf_data.set10('HAVE_OPENCL', 1) endif @@ -72,12 +72,12 @@ if cc.has_header('CL/cl.h') conf_data.set10('HAVE_CL_CL_H', 1) endif -zmqdep = dependency('libzmq', required : false) +zmqdep = dependency('libzmq', required: false) if zmqdep.found() conf_data.set10('HAVE_ZMQ', 1) endif -if cc.has_function('clock_gettime', prefix : '#include <time.h>') +if cc.has_function('clock_gettime', prefix: '#include <time.h>') conf_data.set10('HAVE_CLOCK_GETTIME', 1) endif @@ -87,58 +87,58 @@ subdir('libcrystfel') # ************************ The programs ************************ -configure_file(input : 'config.h.in', - output : 'config.h', - configuration : conf_data) +configure_file(input: 'config.h.in', + output: 'config.h', + configuration: conf_data) conf_inc = include_directories('.') # cell_tool executable('cell_tool', ['src/cell_tool.c', versionc], - dependencies : [mdep, libcrystfeldep], - install : true, + dependencies: [mdep, libcrystfeldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # partial_sim executable('partial_sim', ['src/partial_sim.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep, pthreaddep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # process_hkl process_hkl = executable('process_hkl', ['src/process_hkl.c', versionc], - dependencies : [mdep, libcrystfeldep], - install : true, + dependencies: [mdep, libcrystfeldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # list_events executable('list_events', ['src/list_events.c', versionc], - dependencies : [mdep, libcrystfeldep], - install : true, + dependencies: [mdep, libcrystfeldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # get_hkl executable('get_hkl', ['src/get_hkl.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # compare_hkl executable('compare_hkl', ['src/compare_hkl.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # check_hkl executable('check_hkl', ['src/check_hkl.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # partialator @@ -149,22 +149,22 @@ partialator = executable('partialator', 'src/rejection.c', 'src/scaling.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep, pthreaddep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # ambigator executable('ambigator', ['src/ambigator.c', versionc], - dependencies : [mdep, libcrystfeldep, gsldep, hdf5dep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep, hdf5dep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # whirligig executable('whirligig', ['src/whirligig.c', versionc], - dependencies : [mdep, libcrystfeldep], - install : true, + dependencies: [mdep, libcrystfeldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # indexamajig @@ -176,24 +176,24 @@ if zmqdep.found() endif executable('indexamajig', indexamajig_sources, - dependencies : [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep], - install : true, + dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # make_pixelmap executable('make_pixelmap', ['src/make_pixelmap.c', versionc], - dependencies : [mdep, libcrystfeldep, hdf5dep], - install : true, + dependencies: [mdep, libcrystfeldep, hdf5dep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # geoptimiser # FIXME: restore #executable('geoptimiser', # ['src/geoptimiser.c', 'src/hdfsee-render.c', versionc], -# dependencies : [mdep, libcrystfeldep, gsldep, gdkpixbufdep, gdkdep], -# install : true, -# install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') +# dependencies: [mdep, libcrystfeldep, gsldep, gdkpixbufdep, gdkdep], +# install: true, +# install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # CrystFEL GUI if gtkdep.found() @@ -221,8 +221,8 @@ if gtkdep.found() executable('crystfel', gui_sources, - dependencies : [mdep, libcrystfeldep, gtkdep, gsldep, slurmdep], - install : true, + dependencies: [mdep, libcrystfeldep, gtkdep, gsldep, slurmdep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') endif @@ -230,16 +230,16 @@ endif # render_hkl executable('render_hkl', ['src/render_hkl.c', versionc], - dependencies : [mdep, libcrystfeldep, cairodep, gsldep], - install : true, + dependencies: [mdep, libcrystfeldep, cairodep, gsldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # cell_explorer if gtkdep.found() executable('cell_explorer', ['src/cell_explorer.c', 'src/multihistogram.c', versionc], - dependencies : [mdep, libcrystfeldep, gtkdep, gsldep], - install : true, + dependencies: [mdep, libcrystfeldep, gtkdep, gsldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') endif @@ -249,17 +249,19 @@ 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, + dependencies: [mdep, libcrystfeldep, gsldep, hdf5dep, opencldep], + install: true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') # For testing (see tests/meson.build) -simulation_bits = files(['src/diffraction.c', 'src/diffraction-gpu.c', 'src/cl-utils.c']) +simulation_bits = files(['src/diffraction.c', + 'src/diffraction-gpu.c', + 'src/cl-utils.c']) # ************************ Misc resources ************************ install_data(['data/crystfel.svg'], - install_dir : get_option('datadir')+'/icons/hicolor/scalable/apps') + install_dir: get_option('datadir')+'/icons/hicolor/scalable/apps') # ************************ Testing ************************ |