forked from raspberrypi/rpicam-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
74 lines (60 loc) · 1.86 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
project('libcamera-apps', 'c', 'cpp',
meson_version : '>= 0.64.0',
version : '1.1.3',
default_options : [
'werror=true',
'warning_level=3',
'cpp_std=c++17',
'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')
libcamera_app_src = []
libcamera_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')
libcamera_app = library(
'libcamera_app',
libcamera_app_src,
soversion : meson.project_version(),
include_directories : include_directories('.'),
install : true,
name_prefix : '',
dependencies : libcamera_app_dep,
)
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')