summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/meson.build22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 79b8cbaf..e5e959d9 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -129,21 +129,25 @@ endif
control_sources = []
controls_mode_files = {
- 'controls' : controls_files,
- 'properties' : properties_files,
+ 'controls': [
+ controls_files,
+ 'control_ids.cpp',
+ ],
+ 'properties': [
+ properties_files,
+ 'property_ids.cpp',
+ ],
}
-foreach mode, input_files : controls_mode_files
- if mode == 'controls'
- template_file = files('control_ids.cpp.in')
- else
- template_file = files('property_ids.cpp.in')
- endif
+foreach mode, inout_files : controls_mode_files
+ input_files = inout_files[0]
+ output_file = inout_files[1]
+ template_file = files(output_file + '.in')
ranges_file = files('control_ranges.yaml')
control_sources += custom_target(mode + '_cpp',
input : input_files,
- output : mode + '_ids.cpp',
+ output : output_file,
command : [gen_controls, '-o', '@OUTPUT@',
'--mode', mode, '-t', template_file,
'-r', ranges_file, '@INPUT@'])