summaryrefslogtreecommitdiff
path: root/src/py/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/meson.build')
-rw-r--r--src/py/meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/py/meson.build b/src/py/meson.build
index a4586b4a..92280697 100644
--- a/src/py/meson.build
+++ b/src/py/meson.build
@@ -1,3 +1,15 @@
# SPDX-License-Identifier: CC0-1.0
+py3_dep = dependency('python3', required : get_option('pycamera'))
+pybind11_dep = dependency('pybind11', required : get_option('pycamera'))
+
+pycamera_enabled = py3_dep.found() and pybind11_dep.found()
+if not pycamera_enabled
+ subdir_done()
+endif
+
subdir('libcamera')
+
+pycamera_devenv = environment()
+pycamera_devenv.prepend('PYTHONPATH', meson.current_build_dir())
+meson.add_devenv(pycamera_devenv)