-
Notifications
You must be signed in to change notification settings - Fork 8
/
meson.build
116 lines (100 loc) · 2.77 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
project('Plugin', 'c', 'cpp',
default_options: ['buildtype=release', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++17'],
meson_version: '>=0.48.0',
version: '8'
)
version_h = declare_dependency(
sources: vcs_tag(
command: ['git', 'describe', '--tags', '--long', '--always'],
input: 'version.h.in',
output: 'version.h'
)
)
use_asmjit = false
sources_expr = [
# expr
'expr/vslog.cpp',
'expr/cpufeatures.cpp',
'expr/kernel/cpulevel.cpp',
'expr/exprfilter.cpp',
]
sources_expr2 = [
# expr2
'expr2/exprfilter.cpp',
'expr2/reactor/CPUID.cpp',
'expr2/reactor/Debug.cpp',
'expr2/reactor/EmulatedIntrinsics.cpp',
'expr2/reactor/ExecutableMemory.cpp',
'expr2/reactor/LLVMAsm.cpp',
'expr2/reactor/LLVMJIT.cpp',
'expr2/reactor/LLVMReactor.cpp',
'expr2/reactor/LLVMReactorDebugInfo.cpp',
'expr2/reactor/OptimalIntrinsics.cpp',
'expr2/reactor/Reactor.cpp',
'expr2/reactor/ReactorDebugInfo.cpp',
]
sources_ngx = [
# DLISR
'ngx/ngx.cc',
'ngx/ngximpl.cc',
]
sources_vfx = [
# DLVFX
'vfx/vfx.cc',
'vfx/nvvfx/src/NVVideoEffectsProxy.cpp',
'vfx/nvvfx/src/nvCVImageProxy.cpp',
]
sources_banding = [
# Cambi
'banding/cambifilter.c',
'banding/libvmaf/picture.c',
'banding/libvmaf/cambi.c',
'banding/libvmaf/ref.c',
'banding/libvmaf/mem.c',
#'banding/libvmaf/opt.c',
#'banding/libvmaf/test.c',
#'banding/libvmaf/test_cambi.c',
]
sources_text = [
'text/textfilter.cpp',
'text/tmplfilter.cpp',
]
sources_common = [
# main plugin
'plugin.cpp',
]
deps = []
incdir = [include_directories('text')]
if use_asmjit
sources = sources_common + sources_expr
incdir += include_directories('.')
if host_machine.cpu_family().startswith('x86')
add_project_arguments('-DVS_TARGET_CPU_X86', '-mavx', language: 'cpp')
else
error('the asmjit backend only support x86.')
endif
else
sources = sources_common + sources_expr2
incdir += include_directories('expr2/reactor')
deps += dependency('llvm', version: ['>= 10.0', '< 16'], method: 'config-tool', static: get_option('static-llvm'),
modules: [
'asmprinter', 'executionengine', 'target', 'orcjit', 'native',
])
endif
if target_machine.system() == 'windows'
# DLISR and DLVFX only supports Windows.
sources += sources_ngx + sources_vfx
add_project_arguments('-DHAVE_NGX', '-DHAVE_VFX', language: 'cpp')
endif
sources += sources_banding
sources += sources_text
vapoursynth_dep = dependency('vapoursynth').partial_dependency(compile_args: true, includes: true)
libs = []
shared_module('akarin', sources,
dependencies: deps + [ vapoursynth_dep, version_h ],
link_with: libs,
install: true,
include_directories: incdir,
install_dir: join_paths(vapoursynth_dep.get_pkgconfig_variable('libdir'), 'vapoursynth'),
gnu_symbol_visibility: 'hidden'
)