forked from raspberrypi/rpicam-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
80 lines (65 loc) · 2.06 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
project('rpicam-apps', 'c', 'cpp',
meson_version : '>= 0.64.0',
version : '1.4.1',
default_options : [
'werror=true',
'warning_level=3',
'cpp_std=c++17',
'c_std=c11',
'buildtype=release',
],
license : 'BSD-2-Clause')
meson.add_dist_script('utils' / 'gen-dist.sh')
cpp_arguments = ['-pedantic', '-Wno-unused-parameter', '-faligned-new']
# Needed for file sizes > 32-bits.
cpp_arguments += '-D_FILE_OFFSET_BITS=64'
cxx = meson.get_compiler('cpp')
cpu = host_machine.cpu()
neon = get_option('neon_flags')
if cxx.get_id() == 'gcc'
cpp_arguments += '-Wno-psabi'
endif
if cpu == 'aarch64' or neon == 'arm64'
cpp_arguments += '-ftree-vectorize'
elif neon == 'armv8-neon'
cpp_arguments += ['-mfpu=neon-fp-armv8', '-ftree-vectorize']
endif
libcamera_dep = dependency('libcamera', required : true)
summary({
'location' : libcamera_dep.get_variable('libdir'),
'version' : libcamera_dep.version()
},
section : 'libcamera')
rpicam_app_src = []
rpicam_app_dep = [libcamera_dep]
subdir('core')
subdir('encoder')
subdir('image')
subdir('output')
subdir('preview')
subdir('post_processing_stages')
subdir('utils')
add_project_arguments(cpp_arguments, language : 'cpp')
rpicam_app = library(
'rpicam_app',
rpicam_app_src,
soversion : meson.project_version(),
include_directories : include_directories('.'),
install : true,
name_prefix : '',
dependencies : rpicam_app_dep,
)
# Install a symlink to the old library name for legacy purposes.
install_symlink('libcamera_app.so',
install_dir: get_option('libdir'),
pointing_to: 'rpicam_app.so')
subdir('apps')
summary({
'libav encoder' : enable_libav,
'drm preview' : enable_drm,
'egl preview' : enable_egl,
'qt preview' : enable_qt,
'OpenCV postprocessing' : enable_opencv,
'TFLite postprocessing' : enable_tflite,
},
bool_yn : true, section : 'Build configuration')