diff options
-rw-r--r-- | deps/meson.build | 28 | ||||
-rw-r--r-- | meson_options.txt | 5 | ||||
-rw-r--r-- | src/meson.build | 47 |
3 files changed, 45 insertions, 35 deletions
diff --git a/deps/meson.build b/deps/meson.build index 26feadd..14c19d1 100644 --- a/deps/meson.build +++ b/deps/meson.build @@ -1,14 +1,16 @@ -oclfft_lib = shared_library('oclfft', - sources: [ - 'oclfft/fft_execute.cpp', - 'oclfft/fft_kernelstring.cpp', - 'oclfft/fft_setup.cpp', - ], - dependencies: deps, - install: true, -) +if get_option('oclfft') + oclfft_lib = shared_library('oclfft', + sources: [ + 'oclfft/fft_execute.cpp', + 'oclfft/fft_kernelstring.cpp', + 'oclfft/fft_setup.cpp', + ], + dependencies: deps, + install: true, + ) -oclfft_dep = declare_dependency( - include_directories: include_directories('oclfft'), - link_with: oclfft_lib, -) + oclfft_dep = declare_dependency( + include_directories: include_directories('oclfft'), + link_with: oclfft_lib, + ) +endif diff --git a/meson_options.txt b/meson_options.txt index 057252a..a72e1a2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,8 @@ +option('oclfft', type: 'boolean', value: true, + description: 'Build Apple OpenCL FFT') + option('contrib_filters', type: 'boolean', value: false, - description: 'Enable to build contributed filters') + description: 'Build contributed filters') option('lamino_backproject_burst_mode', type: 'combo', diff --git a/src/meson.build b/src/meson.build index 235d82c..2e67850 100644 --- a/src/meson.build +++ b/src/meson.build @@ -171,31 +171,36 @@ shared_module('conebeamprojectionweight', # fft plugins -fft_deps = deps +have_clfft = clfft_dep.found() +with_oclfft = get_option('oclfft') -if clfft_dep.found() - fft_deps += [clfft_dep] -else - fft_deps += [oclfft_dep] -endif - -common_fft = static_library('commonfft', - 'common/ufo-fft.c', - dependencies: fft_deps, -) +if have_clfft or with_oclfft + fft_deps = deps -foreach plugin: fft_plugins - name = ''.join(plugin.split('-')) + if clfft_dep.found() + fft_deps += [clfft_dep] + else + fft_deps += [oclfft_dep] + endif - shared_module(name, - 'ufo-@0@-task.c'.format(plugin), - dependencies: deps, - name_prefix: 'libufofilter', - link_with: common_fft, - install: true, - install_dir: plugin_install_dir, + common_fft = static_library('commonfft', + 'common/ufo-fft.c', + dependencies: fft_deps, ) -endforeach + + foreach plugin: fft_plugins + name = ''.join(plugin.split('-')) + + shared_module(name, + 'ufo-@0@-task.c'.format(plugin), + dependencies: deps, + name_prefix: 'libufofilter', + link_with: common_fft, + install: true, + install_dir: plugin_install_dir, + ) + endforeach +endif # lamino plugin |