From 9ffee2607edd6573e988bc9a2b086803e484de96 Mon Sep 17 00:00:00 2001 From: Holy Wu Date: Thu, 29 Nov 2018 16:59:15 +0800 Subject: [PATCH] Add Meson build system --- README.md | 7 +++++++ configure.ac | 2 +- meson.build | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meson.build diff --git a/README.md b/README.md index 341b0d7..8af1b9f 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,13 @@ Compilation Requires `fftw3f`. +``` +meson build +ninja -C build +``` + +or + ``` ./autogen.sh ./configure diff --git a/configure.ac b/configure.ac index 8123500..a58dc19 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ X86="false" AS_CASE( [$host_cpu], [i?86], [BITS="32" X86="true"], - [x86_64], [BITS="64" X86="true"], + [x86_64], [BITS="64" X86="true"] ) AS_CASE( diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..6771339 --- /dev/null +++ b/meson.build @@ -0,0 +1,24 @@ +project('DCTFilter', 'cpp', + default_options : ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++14'], + meson_version : '>=0.48.0', + version : '2' +) + +sources = 'DCTFilter/DCTFilter.cpp' + +vapoursynth_dep = dependency('vapoursynth').partial_dependency(compile_args : true, includes : true) + +fftw3f_dep = dependency('fftw3f') + +add_project_arguments('-ffast-math', language : 'cpp') + +if host_machine.cpu_family().startswith('x86') + add_project_arguments('-mfpmath=sse', '-msse2', language : 'cpp') +endif + +shared_module('dctfilter', sources, + dependencies : [vapoursynth_dep, fftw3f_dep], + install : true, + install_dir : join_paths(vapoursynth_dep.get_pkgconfig_variable('libdir'), 'vapoursynth'), + gnu_symbol_visibility : 'hidden' +)