[libcamera-devel] [PATCH 2/6] libcamera-platform: Introduce new platform library
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Jun 16 17:11:48 CEST 2021
The libcamera-platform.so will feature internal support functionality
that is utilised by libcamera, and can be shared in other places.
However - the libcamera-platform library does not constitute a part
of the public libcamera API directly. It is a layer beneath libcamera
which provides common abstractions to internal objects.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
Documentation/Doxyfile.in | 4 +++-
Documentation/meson.build | 2 ++
include/libcamera/meson.build | 1 +
include/libcamera/platform/meson.build | 9 ++++++++
src/libcamera-platform/meson.build | 29 ++++++++++++++++++++++++++
src/libcamera/meson.build | 2 ++
src/meson.build | 1 +
7 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 include/libcamera/platform/meson.build
create mode 100644 src/libcamera-platform/meson.build
diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in
index 8305f56af7a8..c1b395bf0b83 100644
--- a/Documentation/Doxyfile.in
+++ b/Documentation/Doxyfile.in
@@ -791,8 +791,10 @@ WARN_LOGFILE =
INPUT = "@TOP_SRCDIR@/include/libcamera" \
"@TOP_SRCDIR@/src/ipa/libipa" \
"@TOP_SRCDIR@/src/libcamera" \
+ "@TOP_SRCDIR@/src/libcamera-platform" \
"@TOP_BUILDDIR@/include/libcamera" \
- "@TOP_BUILDDIR@/src/libcamera"
+ "@TOP_BUILDDIR@/src/libcamera" \
+ "@TOP_BUILDDIR@/src/libcamera-platform"
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 9ecf4dfcf79f..01b753f07fb6 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -27,6 +27,8 @@ if doxygen.found() and dot.found()
libcamera_ipa_interfaces,
libcamera_public_headers,
libcamera_sources,
+ libcamera_platform_headers,
+ libcamera_platform_sources,
libipa_headers,
libipa_sources,
],
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 086c958b0a53..2c3bbeb8df36 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -25,6 +25,7 @@ include_dir = libcamera_include_dir / 'libcamera'
subdir('internal')
subdir('ipa')
+subdir('platform')
install_headers(libcamera_public_headers,
subdir : include_dir)
diff --git a/include/libcamera/platform/meson.build b/include/libcamera/platform/meson.build
new file mode 100644
index 000000000000..c8e0d0c5ba12
--- /dev/null
+++ b/include/libcamera/platform/meson.build
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: CC0-1.0
+
+libcamera_platform_include_dir = libcamera_include_dir / 'platform'
+
+libcamera_platform_headers = files([
+])
+
+install_headers(libcamera_platform_headers,
+ subdir: libcamera_platform_include_dir)
diff --git a/src/libcamera-platform/meson.build b/src/libcamera-platform/meson.build
new file mode 100644
index 000000000000..64d0dfee2731
--- /dev/null
+++ b/src/libcamera-platform/meson.build
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: CC0-1.0
+
+libcamera_platform_sources = files([
+])
+
+libcamera_platform_deps = [
+]
+
+libcamera_platform_lib = shared_library('libcamera_platform',
+ [libcamera_platform_sources, libcamera_platform_headers],
+ name_prefix : '',
+ install : true,
+ cpp_args : libcamera_cpp_args,
+ include_directories : libcamera_includes,
+ dependencies : libcamera_platform_deps)
+
+libcamera_platform = declare_dependency(sources : [
+ libcamera_platform_headers,
+ ],
+ include_directories : libcamera_includes,
+ link_with : libcamera_platform_lib)
+
+pkg_mod = import('pkgconfig')
+pkg_mod.generate(libraries : libcamera_platform_lib,
+ version : '1.0',
+ name : 'libcamera-platform',
+ filebase : 'camera-platform',
+ description : 'Complex Camera Support Library',
+ subdirs : 'libcamera')
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 54512652272c..6ba59e4006cb 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -127,6 +127,7 @@ libcamera_deps = [
libgnutls,
liblttng,
libudev,
+ libcamera_platform,
dependency('threads'),
]
@@ -156,6 +157,7 @@ libcamera_dep = declare_dependency(sources : [
libcamera_generated_ipa_headers,
],
include_directories : libcamera_includes,
+ dependencies: libcamera_platform,
link_with : libcamera)
subdir('proxy/worker')
diff --git a/src/meson.build b/src/meson.build
index a4e96ecd728a..70e1a4618a0f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -29,6 +29,7 @@ libcamera_cpp_args = []
libcamera_objects = []
# libcamera must be built first as a dependency to the other components.
+subdir('libcamera-platform')
subdir('libcamera')
subdir('android')
--
2.30.2
More information about the libcamera-devel
mailing list