Skip to content

Commit

Permalink
Add Meson build system
Browse files Browse the repository at this point in the history
  • Loading branch information
HolyWu committed Nov 29, 2018
1 parent 22ba745 commit 24bf2fc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Usage
Compilation
===========

```
meson build
ninja -C build
```

or

```
./autogen.sh
./configure
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
43 changes: 43 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
project('DeblockPP7', 'cpp',
default_options : ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++14'],
meson_version : '>=0.48.0',
version : '4'
)

sources = [
'DeblockPP7/DeblockPP7.cpp',
'DeblockPP7/DeblockPP7.hpp',
'DeblockPP7/vectorclass/instrset.h',
'DeblockPP7/vectorclass/instrset_detect.cpp'
]

libs = []

vapoursynth_dep = dependency('vapoursynth').partial_dependency(compile_args : true, includes : true)

add_project_arguments('-ffast-math', language : 'cpp')

if host_machine.cpu_family().startswith('x86')
sources += [
'DeblockPP7/DeblockPP7_SSE2.cpp',
'DeblockPP7/vectorclass/vectorclass.h',
'DeblockPP7/vectorclass/vectorf128.h',
'DeblockPP7/vectorclass/vectori128.h'
]

add_project_arguments('-DVS_TARGET_CPU_X86', '-mfpmath=sse', '-msse2', language : 'cpp')

libs += static_library('sse4', 'DeblockPP7/DeblockPP7_SSE4.cpp',
dependencies : vapoursynth_dep,
cpp_args : '-msse4.1',
gnu_symbol_visibility : 'hidden'
)
endif

shared_module('deblockpp7', sources,
dependencies : vapoursynth_dep,
link_with : libs,
install : true,
install_dir : join_paths(vapoursynth_dep.get_pkgconfig_variable('libdir'), 'vapoursynth'),
gnu_symbol_visibility : 'hidden'
)

0 comments on commit 24bf2fc

Please sign in to comment.