From patchwork Wed Jun 16 15:11:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 12618 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DDE0FC3219 for ; Wed, 16 Jun 2021 15:12:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7D64668949; Wed, 16 Jun 2021 17:11:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="k194kQ/N"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B781168941 for ; Wed, 16 Jun 2021 17:11:57 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5B6231163; Wed, 16 Jun 2021 17:11:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1623856317; bh=oFa64UnUKFy+cnb8ZnQCSyma73A8i9CM9UmBmcxcRqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k194kQ/NqPQJueYBWzj08oaAReg/a/frBX8xIjNrekzEJxAgro/NEC7VUiWCBYgU2 Uo8zsJSI4LkLgDg3O8yfOh/0CxWcfFXlxClP9SFGanTPdrahxvU9jSHTdk6S4tAjwl HqQJXizGgLWrtYIWA9JxOhXe7L/s1rLrv29fFhag= From: Kieran Bingham To: libcamera devel Date: Wed, 16 Jun 2021 16:11:48 +0100 Message-Id: <20210616151152.3856595-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210616151152.3856595-1-kieran.bingham@ideasonboard.com> References: <20210616151152.3856595-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/6] libcamera-platform: Introduce new platform library X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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')