mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-13 05:30:02 +00:00
Added bb file for libcamera integration
Signed-off-by: madhavank27 <madhavan.krishnan@linaro.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+61
@@ -0,0 +1,61 @@
|
|||||||
|
From ea47e53911213d71e997eb34848ae72735bacc82 Mon Sep 17 00:00:00 2001
|
||||||
|
From: madhavank27 <madhavan.krishnan@linaro.org>
|
||||||
|
Date: Thu, 9 Jan 2020 07:42:18 +0100
|
||||||
|
Subject: [PATCH] meson: import python3 to use also from sysroot
|
||||||
|
|
||||||
|
importing python module can provide the exact path
|
||||||
|
which can be used in desktop build as well as from
|
||||||
|
any build system
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
Signed-off-by: madhavank27 <madhavan.krishnan@linaro.org>
|
||||||
|
---
|
||||||
|
include/libcamera/meson.build | 4 +++-
|
||||||
|
src/libcamera/meson.build | 4 +++-
|
||||||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
|
||||||
|
index 99abf06..83525e2 100644
|
||||||
|
--- a/include/libcamera/meson.build
|
||||||
|
+++ b/include/libcamera/meson.build
|
||||||
|
@@ -21,13 +21,15 @@ include_dir = join_paths(libcamera_include_dir, 'libcamera')
|
||||||
|
install_headers(libcamera_api,
|
||||||
|
subdir : include_dir)
|
||||||
|
|
||||||
|
+python_mod = import('python3').find_python()
|
||||||
|
+
|
||||||
|
gen_controls = files('../../src/libcamera/gen-controls.py')
|
||||||
|
|
||||||
|
control_ids_h = custom_target('control_ids_h',
|
||||||
|
input : files('../../src/libcamera/control_ids.yaml', 'control_ids.h.in'),
|
||||||
|
output : 'control_ids.h',
|
||||||
|
depend_files : gen_controls,
|
||||||
|
- command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'],
|
||||||
|
+ command : [python_mod, gen_controls, '-o', '@OUTPUT@', '@INPUT@'],
|
||||||
|
install : true,
|
||||||
|
install_dir : join_paths('include', include_dir))
|
||||||
|
|
||||||
|
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
|
||||||
|
index c4f965b..243935b 100644
|
||||||
|
--- a/src/libcamera/meson.build
|
||||||
|
+++ b/src/libcamera/meson.build
|
||||||
|
@@ -65,13 +65,15 @@ if libudev.found()
|
||||||
|
])
|
||||||
|
endif
|
||||||
|
|
||||||
|
+python_mod = import('python3').find_python()
|
||||||
|
+
|
||||||
|
gen_controls = files('gen-controls.py')
|
||||||
|
|
||||||
|
control_ids_cpp = custom_target('control_ids_cpp',
|
||||||
|
input : files('control_ids.yaml', 'control_ids.cpp.in'),
|
||||||
|
output : 'control_ids.cpp',
|
||||||
|
depend_files : gen_controls,
|
||||||
|
- command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'])
|
||||||
|
+ command : [python_mod, gen_controls, '-o', '@OUTPUT@', '@INPUT@'])
|
||||||
|
|
||||||
|
libcamera_sources += control_ids_cpp
|
||||||
|
libcamera_sources += control_ids_h
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
SUMMARY = "Linux libcamera framework"
|
||||||
|
SECTION = "libs"
|
||||||
|
|
||||||
|
LICENSE = "GPL-2.0 & LGPL-2.1"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "\
|
||||||
|
file://licenses/gnu-gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
|
file://licenses/gnu-lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRC_URI = " \
|
||||||
|
git://linuxtv.org/libcamera.git;protocol=git \
|
||||||
|
file://0001-meson-import-python3-to-use-also-from-sysroot.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRCREV = "53eab996809e826bc914e4c34c78fe74d86f8dc4"
|
||||||
|
|
||||||
|
PV = "201910+git${SRCPV}"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
DEPENDS = "python3-pyyaml-native udev"
|
||||||
|
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
|
||||||
|
|
||||||
|
inherit meson pkgconfig python3native
|
||||||
|
|
||||||
|
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
|
||||||
|
FILES_${PN} += " ${libdir}/libcamera.so"
|
||||||
|
|
||||||
Reference in New Issue
Block a user