From patchwork Wed Jul 31 13:51:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 20725 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 65394C323E for ; Wed, 31 Jul 2024 13:52:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8007263377; Wed, 31 Jul 2024 15:52:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="a8sdwjKV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 14CE76336F for ; Wed, 31 Jul 2024 15:52:17 +0200 (CEST) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2FEAB144C; Wed, 31 Jul 2024 15:51:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1722433889; bh=nsOrX3PBiE3XNCUip72vQ+s0I9eV8sVLuBq7DLojLIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8sdwjKVUHYAPplIvArLsC7XoD8NPrsV9660wbJ3pawEvcrRC+qeDvTtcPKc+JHta LQlmmVeTGXRXjBhCfmCXpYjC4ue1PJd99pZUKfpHaCgtRaOGX/BDTOTTSuvuC3xBrU XHpUL9DSKNJJwAjpVCSSX1YQlK5xgSOna0mZojy8= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally , Laurent Pinchart Subject: [PATCH v4 1/4] meson: libcamera: Split public and internal source arrays Date: Wed, 31 Jul 2024 14:51:58 +0100 Message-Id: <20240731135201.2866145-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240731135201.2866145-1-dan.scally@ideasonboard.com> References: <20240731135201.2866145-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 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" Meson array variables hold lists of libcamera's source files. To help facilitate the splitting of Doxygen generated documentation into distinct public and internal versions, split those arrays to separate public and internal variables. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Reviewed-by: Kieran Bingham --- Changes in v4: - Missing comma Changes in v3: - Didn't swap span.h to private array - dropped _publically from array name Changes in v2: - New patch include/libcamera/internal/meson.build | 21 +++++++++++---- src/libcamera/base/meson.build | 24 +++++++++++------ src/libcamera/meson.build | 36 ++++++++++++++++---------- src/libcamera/sensor/meson.build | 5 ++++ 4 files changed, 59 insertions(+), 27 deletions(-) diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build index 9713ea1c..76c939bf 100644 --- a/include/libcamera/internal/meson.build +++ b/include/libcamera/internal/meson.build @@ -9,13 +9,21 @@ libcamera_tracepoint_header = custom_target( command : [gen_tracepoints_header, include_build_dir, '@OUTPUT@', '@INPUT@'], ) -libcamera_internal_headers = files([ +# Where libcamera's public API classes have Extensible::Private counterparts we +# need to include them in doxygen's public API run or it will complain that the +# functions defined in the "public" source are undeclared. +libcamera_internal_headers_documented = files([ + 'camera.h', + 'camera_manager.h', + 'framebuffer.h', + 'request.h', +]) + +libcamera_internal_headers_undocumented = files([ 'bayer_format.h', 'byte_stream_buffer.h', - 'camera.h', 'camera_controls.h', 'camera_lens.h', - 'camera_manager.h', 'camera_sensor.h', 'camera_sensor_properties.h', 'control_serializer.h', @@ -27,7 +35,6 @@ libcamera_internal_headers = files([ 'device_enumerator_udev.h', 'dma_buf_allocator.h', 'formats.h', - 'framebuffer.h', 'ipa_manager.h', 'ipa_module.h', 'ipa_proxy.h', @@ -38,7 +45,6 @@ libcamera_internal_headers = files([ 'pipeline_handler.h', 'process.h', 'pub_key.h', - 'request.h', 'shared_mem_object.h', 'source_paths.h', 'sysfs.h', @@ -49,5 +55,10 @@ libcamera_internal_headers = files([ 'yaml_parser.h', ]) +libcamera_internal_headers = [ + libcamera_internal_headers_documented, + libcamera_internal_headers_undocumented, +] + subdir('converter') subdir('software_isp') diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build index 7a7fd7e4..523c5885 100644 --- a/src/libcamera/base/meson.build +++ b/src/libcamera/base/meson.build @@ -1,27 +1,35 @@ # SPDX-License-Identifier: CC0-1.0 -libcamera_base_sources = files([ - 'backtrace.cpp', - 'class.cpp', +libcamera_base_public_sources = files([ 'bound_method.cpp', + 'class.cpp', + 'flags.cpp', + 'object.cpp', + 'shared_fd.cpp', + 'signal.cpp', + 'unique_fd.cpp', +]) + +libcamera_base_internal_sources = files([ + 'backtrace.cpp', 'event_dispatcher.cpp', 'event_dispatcher_poll.cpp', 'event_notifier.cpp', 'file.cpp', - 'flags.cpp', 'log.cpp', 'message.cpp', 'mutex.cpp', - 'object.cpp', 'semaphore.cpp', - 'shared_fd.cpp', - 'signal.cpp', 'thread.cpp', 'timer.cpp', - 'unique_fd.cpp', 'utils.cpp', ]) +libcamera_base_sources = [ + libcamera_base_public_sources, + libcamera_base_internal_sources +] + libdw = dependency('libdw', required : false) libunwind = dependency('libunwind', required : false) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 89504cee..9c74241d 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -1,14 +1,26 @@ # SPDX-License-Identifier: CC0-1.0 -libcamera_sources = files([ - 'bayer_format.cpp', - 'byte_stream_buffer.cpp', +libcamera_public_sources = files([ 'camera.cpp', - 'camera_controls.cpp', - 'camera_lens.cpp', 'camera_manager.cpp', 'color_space.cpp', 'controls.cpp', + 'fence.cpp', + 'framebuffer.cpp', + 'framebuffer_allocator.cpp', + 'geometry.cpp', + 'orientation.cpp', + 'pixel_format.cpp', + 'request.cpp', + 'stream.cpp', + 'transform.cpp', +]) + +libcamera_internal_sources = files([ + 'bayer_format.cpp', + 'byte_stream_buffer.cpp', + 'camera_controls.cpp', + 'camera_lens.cpp', 'control_serializer.cpp', 'control_validator.cpp', 'converter.cpp', @@ -16,11 +28,7 @@ libcamera_sources = files([ 'device_enumerator.cpp', 'device_enumerator_sysfs.cpp', 'dma_buf_allocator.cpp', - 'fence.cpp', 'formats.cpp', - 'framebuffer.cpp', - 'framebuffer_allocator.cpp', - 'geometry.cpp', 'ipa_controls.cpp', 'ipa_data_serializer.cpp', 'ipa_interface.cpp', @@ -33,17 +41,12 @@ libcamera_sources = files([ 'mapped_framebuffer.cpp', 'media_device.cpp', 'media_object.cpp', - 'orientation.cpp', 'pipeline_handler.cpp', - 'pixel_format.cpp', 'process.cpp', 'pub_key.cpp', - 'request.cpp', 'shared_mem_object.cpp', 'source_paths.cpp', - 'stream.cpp', 'sysfs.cpp', - 'transform.cpp', 'v4l2_device.cpp', 'v4l2_pixelformat.cpp', 'v4l2_subdevice.cpp', @@ -51,6 +54,11 @@ libcamera_sources = files([ 'yaml_parser.cpp', ]) +libcamera_sources = [ + libcamera_public_sources, + libcamera_internal_sources +] + libcamera_sources += libcamera_public_headers libcamera_sources += libcamera_generated_ipa_headers libcamera_sources += libcamera_tracepoint_header diff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build index bf4b131a..1c1fc5a4 100644 --- a/src/libcamera/sensor/meson.build +++ b/src/libcamera/sensor/meson.build @@ -1,5 +1,10 @@ # SPDX-License-Identifier: CC0-1.0 +libcamera_internal_sources += files([ + 'camera_sensor.cpp', + 'camera_sensor_properties.cpp', +]) + libcamera_sources += files([ 'camera_sensor.cpp', 'camera_sensor_properties.cpp',