summaryrefslogtreecommitdiff
path: root/src/py/libcamera/meson.build
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-27 17:44:18 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-27 22:02:16 +0300
commit9ecf311375c10833c013491f4f77aa2c2a020a28 (patch)
treeef649846aad3053ea477f781f8f2cc258211c4d5 /src/py/libcamera/meson.build
parentc3515cf6e57bf4016f84c1228f26bf7dc69027e1 (diff)
py: Generate pixel formats list
Generate a list of pixel formats under 'libcamera.formats'. The 'formats' is a "dummy" container class, the only purpose of which is to contain the read-only pixel format properties. 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.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index a3388c63..0a7b65f3 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -30,6 +30,18 @@ pycamera_sources += custom_target('py_gen_controls',
output : ['py_control_enums_generated.cpp'],
command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])
+gen_py_formats_input_files = files([
+ '../../libcamera/formats.yaml',
+ 'py_formats_generated.cpp.in',
+])
+
+gen_py_formats = files('gen-py-formats.py')
+
+pycamera_sources += custom_target('py_gen_formats',
+ input : gen_py_formats_input_files,
+ output : ['py_formats_generated.cpp'],
+ command : [gen_py_formats, '-o', '@OUTPUT@', '@INPUT@'])
+
pycamera_deps = [
libcamera_public,
py3_dep,