Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Commit

Permalink
Add Meson build system
Browse files Browse the repository at this point in the history
  • Loading branch information
HolyWu committed Nov 30, 2018
1 parent 40cb190 commit 96418f0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ Note that it only makes sense to do so in same rate mode, because the output's n
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
47 changes: 47 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
project('TDeintMod', 'cpp',
default_options : ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++14'],
meson_version : '>=0.48.0',
version : '10'
)

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

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

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

libs = []

if host_machine.cpu_family().startswith('x86')
add_project_arguments('-DVS_TARGET_CPU_X86', '-mfpmath=sse', '-msse2', language : 'cpp')

sources += [
'TDeintMod/TDeintMod_SSE2.cpp',
'TDeintMod/vectorclass/vectorclass.h',
'TDeintMod/vectorclass/vectorf128.h',
'TDeintMod/vectorclass/vectorf256.h',
'TDeintMod/vectorclass/vectorf256e.h',
'TDeintMod/vectorclass/vectori128.h',
'TDeintMod/vectorclass/vectori256.h',
'TDeintMod/vectorclass/vectori256e.h'
]

libs += static_library('avx2', 'TDeintMod/TDeintMod_AVX2.cpp',
dependencies : vapoursynth_dep,
cpp_args : ['-mavx2', '-mfma'],
gnu_symbol_visibility : 'hidden'
)
endif

shared_module('tdeintmod', 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 96418f0

Please sign in to comment.