-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
130 lines (112 loc) · 2.89 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
project(
'pivid', ['c', 'cpp'],
version: '0.0',
default_options: [
'cpp_std=c++2a',
'python.install_env=venv',
'warning_level=3',
'werror=true',
]
)
add_project_arguments(
'-Wno-pedantic', '-Wno-psabi', '-DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE',
language: ['c', 'cpp']
)
util_deps = [
dependency('doctest'),
dependency('CLI11'),
dependency('fmt'),
dependency('nlohmann_json'),
dependency('spdlog'),
meson.get_compiler('cpp').find_library('atomic'),
meson.get_compiler('cpp').find_library('stdc++fs'),
]
libav_deps = [
dependency('libavcodec'),
dependency('libavfilter'),
dependency('libavformat'),
dependency('libavutil'),
]
linux_dep = dependency('linux-headers-generic')
python_bin = import('python').find_installation('python3')
display_mode_inc = custom_target(
'display_mode.inc',
output: 'display_mode.inc',
input: 'display_mode_gen.py',
command: [python_bin, '@INPUT@', '--output', '@OUTPUT@']
)
pivid_lib = library(
'pivid', [
'bezier_spline.cpp',
'display_mode.cpp',
display_mode_inc,
'display_output.cpp',
'frame_loader.cpp',
'frame_player.cpp',
'image_buffer.cpp',
'interval.cpp',
'media_decoder.cpp',
'script_data.cpp',
'script_runner.cpp',
'unix_system.cpp',
],
dependencies: [libav_deps, util_deps],
)
executable(
'pivid_inspect_avformat', 'pivid_inspect_avformat.cpp',
link_with: [pivid_lib],
dependencies: [util_deps, libav_deps],
)
executable(
'pivid_inspect_kms', 'pivid_inspect_kms.cpp',
link_with: [pivid_lib],
dependencies: [util_deps, linux_dep],
)
executable(
'pivid_inspect_kmsg', 'pivid_inspect_kmsg.cpp',
link_with: [pivid_lib],
dependencies: [util_deps, linux_dep],
)
executable(
'pivid_inspect_v4l2', 'pivid_inspect_v4l2.cpp',
dependencies: [util_deps, linux_dep],
)
executable(
'pivid_list_modes', 'pivid_list_modes.cpp',
link_with: [pivid_lib],
dependencies: [util_deps],
)
executable(
'pivid_scan_media', 'pivid_scan_media.cpp',
link_with: [pivid_lib],
dependencies: [util_deps],
)
executable(
'pivid_play', 'pivid_play.cpp',
link_with: [pivid_lib],
dependencies: [util_deps],
)
executable(
'pivid_scan_displays', 'pivid_scan_displays.cpp',
link_with: [pivid_lib],
dependencies: [util_deps],
)
executable(
'pivid_server', 'pivid_server.cpp',
link_with: [pivid_lib],
dependencies: [util_deps, dependency('cpp-httplib')],
)
pivid_test = executable(
'pivid_test', [
'bezier_spline_test.cpp',
'display_mode_test.cpp',
'interval_test.cpp',
'pivid_test_main.cpp',
'script_data_test.cpp',
'unix_system_test.cpp',
'xy_test.cpp',
],
link_with: [pivid_lib],
dependencies: [util_deps],
)
test('pivid tests', pivid_test)