From patchwork Sun Nov 27 23:01:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Rauch X-Patchwork-Id: 17901 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 54804BE08B for ; Sun, 27 Nov 2022 23:01:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9A7C863335; Mon, 28 Nov 2022 00:01:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1669590075; bh=xXAGUgTENEYxwdjvgYHrAuTjkEI/9XLuA/kiMh6okmQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dstdzU+wNPc7N8Op6e1fmt40HvOMwaQX2LmJ0dLhLXBQgO/vZwoOzIABZOv6cW0RK rZBuGlFgcc8x28yNv4OYCLGYxn7ye0TcpmtKNCacqVrXJoa6G1J0GiQ5M0QiA1etZi ty2Zy1/2slVQsA59WrWeTSRkvw5Pm1E2dI1uUQBO5bnv3jsnde1bIW7FBcy37RtQxz WgdANkQsOZmDOXYeXYuZvoERkQ4CsKlGcqykELS3aKvgpqfX8VHW9mrudYhp3Uz6RL VnYQBb1UQEoScUUaL8Mf9vyKaw3/qKhCPQF/MqNw2Z34Yx1G/kFMwvhDdzZOvDPvPE EiXbrqCPk8PsA== Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A7C661F26 for ; Mon, 28 Nov 2022 00:01:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmx.de header.i=@gmx.de header.b="gV3qiJXa"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669590073; bh=xXAGUgTENEYxwdjvgYHrAuTjkEI/9XLuA/kiMh6okmQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=gV3qiJXa+vJ0DUrGLtSR0sa2cyCwEgrmxoyViA0WqCYZY7zGLBQt2a4a8Ygflzv/S ZfqFm1ENvp/TFnBspwsKHimOu8NoZ1sIm8sD0POo7ZRmmhSnhjiUlR1W0Edn/w2X71 PKyrNSBm5HPjmdTK39e4WzomqDdZXhFlUgDzH3oNXXmZV70cf5r3eueuoW9oU1oDZA I3rFCTCjX5FozdBZMG2Z6vkZInHIjW2uKQBvEPL/CklgiTVNeAP6I5kDwzu81Cg0tP QErnZAIyt6mnQZLX2B1BJPtejA/X9StkQFhIZsPVN/1+gqoM9vJip1N5uR8wrb34pI q5Z5atK8EXr9w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from voyager ([88.152.184.103]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mo6qv-1oee4h3zad-00pZYk; Mon, 28 Nov 2022 00:01:13 +0100 To: libcamera-devel@lists.libcamera.org Date: Mon, 28 Nov 2022 00:01:10 +0100 Message-Id: <20221127230110.192298-1-Rauch.Christian@gmx.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:X0xGvLDGf48bQAKB2KUIsXrWMiDTTQmPAIWz5wp4lgro3IoT3ZT kJnEz7scT4Ls/ccll8vdVmUASJCg1uzYrMWUNXnGWAGi4LCzjPO2wV7TxN5/1UnZGPHgYSt 3R7qzX3ArsVK6ugqHtv/3yUZ8eaB8hX7FMErf2v4zE50/8KklpePrB6kxspDAHlUboMm2wR Vo1ZXpGN/p5EIKVxR5oTQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1; M01:P0:llp1jIw+CWE=; fG6W9q68HdeDJ+U7B/YlJF9FWqB 5sJi9M4GV9tkysAU9b3PeatErQOjRVxGIz6WCQTgf3mGuga9INow/GFu6SAMfBbzWLNCBlhmb jtAnQF3TYkA8LD8MqJLsoMvm3YukSimIBX2Th1Ovh/xgINxKGrxEhIzHkD+vy4zdDwd6IZHys MQeotxWxYePhoBwpYt97GH5fo9tr+5ujuhuKOYiqt+n0ua/Pa90IetrqUcKuTSpQ65f23XK1C 6M0BNwcpDaEbXX/fSe+Nz6uQkratV1udJkr15KUClKM2vOBA4ZJ/U/w010P3CCl9yYPn2tHUx Sf3nRRU4AcaDJ4U9dYCNUC2kOBFC0jAOwM61cRhEwImZk5YMiYA05fZ/v2BMWR6Nl6VL55PRi W4wpyGca02SKepKRH5p2DWl08Z8SoUWPfLfoR7mVE/eGE+w6+3LW/t3Mj1cLw4Szenk+r65Vn o/Gqef+2PWMvA6YQOkshP7UuH6hy+pjmaewAmG6C/q5QjcnadjLG3LoUSuwrfPEzwefN3bjat kueoW4Kbunr0zSfAIclMjp4QJ8IyfPXacikSlgpQr5DZxwhvlLFWKE+OgDVxU/0g+qjSlO+GV eJscCGF8cAQIA2n5+X37SvGJsR0yNcpgNYj1bP4hqj7AQD2aMhLKZUv3GUgZ/alKD70Oi5GzG CAwFrs5z13BJtNJu+oJES4mBWFtF75AuPFsdWWJCsZV0O07uLzPTlSXepqUFboU6r+IqjVnA5 tiibYWCBa2BqQiXWfYsrlE5LEjDUttNf/InBCHPUDUbhc87XhT0l5Ir+GVbDiebH86E6SiIHo 0JwMw8P9sKeuMhobXZ/cQMt4o9tymYfFG340/Ca+dyq/1U3lSVoUhAVtnJV+4GcmqO5ZTkylL PXEoSNwnGlQo5rbr55hktxrKeflwG0Pc9fbAfimPIQk+YKe5COwRNqT/hLgo2GACcIzaR+Fjp qZgy4GcdRDw4rXtnpYELrfSz9ko= Subject: [libcamera-devel] [PATCH] meson: Use library() in order to let user chose the library type 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: , X-Patchwork-Original-From: Christian Rauch via libcamera-devel From: Christian Rauch Reply-To: Christian Rauch Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Defining libraries via shared_library() prevents compiling libcamera as static library. The meson project recommends using library() instead of shared_library(), static_library() or both_libraries(): https://mesonbuild.com/Reference-manual_functions.html#library Signed-off-by: Christian Rauch --- src/android/meson.build | 16 ++++++++-------- src/gstreamer/meson.build | 2 +- src/libcamera/base/meson.build | 18 +++++++++--------- src/libcamera/meson.build | 18 +++++++++--------- src/v4l2/meson.build | 12 ++++++------ 5 files changed, 33 insertions(+), 33 deletions(-) -- 2.34.1 diff --git a/src/android/meson.build b/src/android/meson.build index 1bba54de..51b365e3 100644 --- a/src/android/meson.build +++ b/src/android/meson.build @@ -67,11 +67,11 @@ android_camera_metadata = static_library('camera_metadata', c_args : '-Wno-shadow', include_directories : android_includes) -libcamera_hal = shared_library('libcamera-hal', - android_hal_sources, - name_prefix : '', - link_with : android_camera_metadata, - install : true, - cpp_args : android_cpp_args, - include_directories : android_includes, - dependencies : android_deps) +libcamera_hal = library('libcamera-hal', + android_hal_sources, + name_prefix : '', + link_with : android_camera_metadata, + install : true, + cpp_args : android_cpp_args, + include_directories : android_includes, + dependencies : android_deps) diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build index eda246d7..b364837d 100644 --- a/src/gstreamer/meson.build +++ b/src/gstreamer/meson.build @@ -39,7 +39,7 @@ if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0') libcamera_gst_cpp_args += ['-Wno-unused-function'] endif -libcamera_gst = shared_library('gstlibcamera', +libcamera_gst = library('gstlibcamera', libcamera_gst_sources, cpp_args : libcamera_gst_cpp_args, dependencies : [libcamera_private, gstvideo_dep, gstallocator_dep], diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build index 7a7fd7e4..91dc1e71 100644 --- a/src/libcamera/base/meson.build +++ b/src/libcamera/base/meson.build @@ -48,15 +48,15 @@ libcamera_base_deps = [ # the use of headers which must not be exposed to the libcamera public api. libcamera_base_args = [ '-DLIBCAMERA_BASE_PRIVATE' ] -libcamera_base_lib = shared_library('libcamera-base', - [libcamera_base_sources, libcamera_base_headers], - version : libcamera_version, - soversion : libcamera_soversion, - name_prefix : '', - install : true, - cpp_args : libcamera_base_args, - include_directories : libcamera_includes, - dependencies : libcamera_base_deps) +libcamera_base_lib = library('libcamera-base', + [libcamera_base_sources, libcamera_base_headers], + version : libcamera_version, + soversion : libcamera_soversion, + name_prefix : '', + install : true, + cpp_args : libcamera_base_args, + include_directories : libcamera_includes, + dependencies : libcamera_base_deps) libcamera_base = declare_dependency(sources : [ libcamera_base_headers, diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 0494e808..cd1bf4ed 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -163,15 +163,15 @@ libcamera_deps = [ # runtime if the library is running from an installed location by checking # for the presence or abscence of the dynamic tag. -libcamera = shared_library('libcamera', - libcamera_sources, - version : libcamera_version, - soversion : libcamera_soversion, - name_prefix : '', - install : true, - include_directories : includes, - build_rpath : '/', - dependencies : libcamera_deps) +libcamera = library('libcamera', + libcamera_sources, + version : libcamera_version, + soversion : libcamera_soversion, + name_prefix : '', + install : true, + include_directories : includes, + build_rpath : '/', + dependencies : libcamera_deps) libcamera_public = declare_dependency(sources : [ libcamera_ipa_headers, diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index f132103c..46dab168 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -27,12 +27,12 @@ v4l2_compat_cpp_args = [ '-fvisibility=hidden', ] -v4l2_compat = shared_library('v4l2-compat', - v4l2_compat_sources, - name_prefix : '', - install : true, - dependencies : [libcamera_private, libdl], - cpp_args : v4l2_compat_cpp_args) +v4l2_compat = library('v4l2-compat', + v4l2_compat_sources, + name_prefix : '', + install : true, + dependencies : [libcamera_private, libdl], + cpp_args : v4l2_compat_cpp_args) # Provide a wrapper script to support easily loading applications with the V4L2 # adaptation layer.