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
|
libcamera_api = files([
'bound_method.h',
'buffer.h',
'camera.h',
'camera_manager.h',
'controls.h',
'event_dispatcher.h',
'event_notifier.h',
'file_descriptor.h',
'framebuffer_allocator.h',
'geometry.h',
'logging.h',
'object.h',
'pixelformats.h',
'request.h',
'signal.h',
'span.h',
'stream.h',
'timer.h',
])
include_dir = join_paths(libcamera_include_dir, 'libcamera')
install_headers(libcamera_api,
subdir : include_dir)
gen_controls = files('../../src/libcamera/gen-controls.py')
control_source_files = [
'control_ids',
'property_ids',
]
control_headers = []
foreach header : control_source_files
input_files = files('../../src/libcamera/' + header +'.yaml', header + '.h.in')
control_headers += custom_target(header + '_h',
input : input_files,
output : header + '.h',
depend_files : gen_controls,
command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'],
install : true,
install_dir : join_paths('include', include_dir))
endforeach
libcamera_api += control_headers
gen_header = files('gen-header.sh')
libcamera_h = custom_target('gen-header',
input : 'meson.build',
output : 'libcamera.h',
command : [gen_header, meson.current_source_dir(), '@OUTPUT@'],
install : true,
install_dir : join_paths('include', include_dir))
libcamera_api += libcamera_h
version = libcamera_version.split('.')
libcamera_version_config = configuration_data()
libcamera_version_config.set('LIBCAMERA_VERSION_MAJOR', version[0])
libcamera_version_config.set('LIBCAMERA_VERSION_MINOR', version[1])
libcamera_version_config.set('LIBCAMERA_VERSION_PATCH', version[2])
configure_file(input : 'version.h.in',
output : 'version.h',
configuration : libcamera_version_config,
install_dir : join_paths('include', include_dir))
|