summaryrefslogtreecommitdiff
path: root/src/py/libcamera/meson.build
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-11-20 13:54:28 +0000
committerNaushir Patuck <naush@raspberrypi.com>2023-11-29 09:05:38 +0000
commitbba4ec63c4b0699b7f7ffb20e4f37af2b996d355 (patch)
treeafb047373376ea73124b58bb5b8af69a0c293c36 /src/py/libcamera/meson.build
parentbd6658943a97288b5673e65649a3a48dac7c78da (diff)
controls: Update argument handling for controls generation scripts
The template file to the gen-controls.py and gen-py-controls.py is now passed in through the '-t' or '--template' command line argument instead of being a positional argument. This will allow multiple input files to be provided to the scripts in a future commit. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/py/libcamera/meson.build')
-rw-r--r--src/py/libcamera/meson.build18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index f58c7198..1c3ea184 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -28,29 +28,27 @@ pycamera_sources = files([
# Generate controls
-gen_py_controls_input_files = files([
- '../../libcamera/control_ids.yaml',
- 'py_controls_generated.cpp.in',
-])
+gen_py_controls_input_files = files('../../libcamera/control_ids.yaml')
+gen_py_controls_template = files('py_controls_generated.cpp.in')
gen_py_controls = files('gen-py-controls.py')
pycamera_sources += custom_target('py_gen_controls',
input : gen_py_controls_input_files,
output : ['py_controls_generated.cpp'],
- command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@', '@INPUT@'])
+ command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@',
+ '-t', gen_py_controls_template, '@INPUT@'])
# Generate properties
-gen_py_property_enums_input_files = files([
- '../../libcamera/property_ids.yaml',
- 'py_properties_generated.cpp.in',
-])
+gen_py_property_enums_input_files = files('../../libcamera/property_ids.yaml')
+gen_py_properties_template = files('py_properties_generated.cpp.in')
pycamera_sources += custom_target('py_gen_properties',
input : gen_py_property_enums_input_files,
output : ['py_properties_generated.cpp'],
- command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@', '@INPUT@'])
+ command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@',
+ '-t', gen_py_properties_template, '@INPUT@'])
# Generate formats