[libcamera-devel] [PATCH 2/6] libcamera-platform: Introduce new platform library
Umang Jain
umang.jain at ideasonboard.com
Thu Jun 17 07:32:39 CEST 2021
Hi Kieran,
On 6/16/21 8:41 PM, Kieran Bingham wrote:
> The libcamera-platform.so will feature internal support functionality
> that is utilised by libcamera, and can be shared in other places.
this sounds similar to -dev / -devel packages listed in distributions.
May we can use that suffix? :-)
libcamera: A complex camera support library for Linux, Android, and ChromeOS
libcamera-dev: Development files for libcamera
>
> 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,
isn't libcamera_includes an overkill here? Since we are splitting off
the libraries, I think we should map the relevant include-directories
for that component? I don't expect you to fix this in this series, but
just wanted to see if this was the right way ahead?
> + 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')
More information about the libcamera-devel
mailing list