diff options
Diffstat (limited to 'include/libcamera/meson.build')
-rw-r--r-- | include/libcamera/meson.build | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 408b7acf..84c6c4cb 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -12,6 +12,7 @@ libcamera_public_headers = files([ 'framebuffer_allocator.h', 'geometry.h', 'logging.h', + 'orientation.h', 'pixel_format.h', 'request.h', 'stream.h', @@ -31,20 +32,58 @@ install_headers(libcamera_public_headers, libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir -# control_ids.h and property_ids.h -control_source_files = [ - 'control_ids', - 'property_ids', -] +controls_map = { + 'controls': { + 'draft': 'control_ids_draft.yaml', + 'core': 'control_ids_core.yaml', + 'rpi/vc4': 'control_ids_rpi.yaml', + }, + + 'properties': { + 'draft': 'property_ids_draft.yaml', + 'core': 'property_ids_core.yaml', + } +} control_headers = [] +controls_files = [] +properties_files = [] + +foreach mode, entry : controls_map + files_list = [] + input_files = [] + foreach vendor, header : entry + if vendor != 'core' and vendor != 'draft' + if vendor not in pipelines + continue + endif + endif + + if header in files_list + continue + endif + + files_list += header + input_files += files('../../src/libcamera/' + header) + endforeach + + outfile = '' + if mode == 'controls' + outfile = 'control_ids.h' + controls_files += files_list + else + outfile = 'property_ids.h' + properties_files += files_list + endif -foreach header : control_source_files - input_files = files('../../src/libcamera/' + header +'.yaml', header + '.h.in') + template_file = files(outfile + '.in') + ranges_file = files('../../src/libcamera/control_ranges.yaml') control_headers += custom_target(header + '_h', input : input_files, - output : header + '.h', - command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'], + output : outfile, + command : [gen_controls, '-o', '@OUTPUT@', + '--mode', mode, '-t', template_file, + '-r', ranges_file, '@INPUT@'], install : true, install_dir : libcamera_headers_install_dir) endforeach |