summaryrefslogtreecommitdiff
path: root/src/py/libcamera/meson.build
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-27 17:44:32 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-27 22:03:44 +0300
commita69b73cc584e276e967c484a2592b0f47663b541 (patch)
tree8aff6593b4743bdc9ff04789343220d17724fbe4 /src/py/libcamera/meson.build
parent7a0a464dd13e3c0c266267dfcae75f5f09434cbf (diff)
py: Generate bindings for properties
Generate bindings for properties in a very similar way as done for controls. We do need to distinguish between the two, and thus I added --properties flag to gen-py-controls.py. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/py/libcamera/meson.build')
-rw-r--r--src/py/libcamera/meson.build14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index e8010846..afa7efed 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -30,7 +30,19 @@ 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, '-o', '@OUTPUT@', '@INPUT@'])
+ command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@', '@INPUT@'])
+
+# Generate properties
+
+gen_py_property_enums_input_files = files([
+ '../../libcamera/property_ids.yaml',
+ '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@'])
# Generate formats