diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/py/libcamera/meson.build | 12 | ||||
-rw-r--r-- | src/py/libcamera/py_control_enums_generated.cpp.in (renamed from src/py/libcamera/py_enums_generated.cpp.in) | 8 | ||||
-rw-r--r-- | src/py/libcamera/py_main.cpp | 4 |
3 files changed, 10 insertions, 14 deletions
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index 55957252..a3388c63 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -18,20 +18,18 @@ pycamera_sources = files([ 'py_main.cpp', ]) -gen_input_files = files([ +gen_py_control_enums_input_files = files([ '../../libcamera/control_ids.yaml', - 'py_enums_generated.cpp.in', + 'py_control_enums_generated.cpp.in', ]) gen_py_control_enums = files('gen-py-control-enums.py') -generated_sources = custom_target('py_gen_controls', - input : gen_input_files, - output : ['py_enums_generated.cpp'], +pycamera_sources += custom_target('py_gen_controls', + input : gen_py_control_enums_input_files, + output : ['py_control_enums_generated.cpp'], command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@']) -pycamera_sources += generated_sources - pycamera_deps = [ libcamera_public, py3_dep, diff --git a/src/py/libcamera/py_enums_generated.cpp.in b/src/py/libcamera/py_control_enums_generated.cpp.in index 20e07528..ed81fbe7 100644 --- a/src/py/libcamera/py_enums_generated.cpp.in +++ b/src/py/libcamera/py_control_enums_generated.cpp.in @@ -2,20 +2,18 @@ /* * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> * - * Python bindings - Auto-generated enums + * Python bindings - Auto-generated control enums * * This file is auto-generated. Do not edit. */ -#include <libcamera/libcamera.h> +#include <libcamera/control_ids.h> #include <pybind11/smart_holder.h> namespace py = pybind11; -using namespace libcamera; - -void init_py_enums_generated(py::module& m) +void init_py_control_enums_generated(py::module& m) { ${enums} } diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp index b05bbb22..1d941160 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -131,13 +131,13 @@ static void handleRequestCompleted(Request *req) } void init_py_enums(py::module &m); -void init_py_enums_generated(py::module &m); +void init_py_control_enums_generated(py::module &m); void init_py_geometry(py::module &m); PYBIND11_MODULE(_libcamera, m) { init_py_enums(m); - init_py_enums_generated(m); + init_py_control_enums_generated(m); init_py_geometry(m); /* Forward declarations */ |