From patchwork Mon Mar 11 20:31:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Szczepanek X-Patchwork-Id: 138168 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64BEF43C8A; Mon, 11 Mar 2024 21:31:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B57D40E09; Mon, 11 Mar 2024 21:31:40 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id AE48640647 for ; Mon, 11 Mar 2024 21:31:37 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F28911007; Mon, 11 Mar 2024 13:32:13 -0700 (PDT) Received: from ampere-altra-2-1.usa.Arm.com (ampere-altra-2-1.usa.arm.com [10.118.91.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E30A43F844; Mon, 11 Mar 2024 13:31:36 -0700 (PDT) From: Paul Szczepanek To: dev@dpdk.org Cc: bruce.richardson@intel.com, Paul Szczepanek , Honnappa Nagarahalli Subject: [PATCH v10 1/5] lib: allow libraries with no sources Date: Mon, 11 Mar 2024 20:31:25 +0000 Message-Id: <20240311203129.335720-2-paul.szczepanek@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240311203129.335720-1-paul.szczepanek@arm.com> References: <20230927150854.3670391-2-paul.szczepanek@arm.com> <20240311203129.335720-1-paul.szczepanek@arm.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Allow header only libraries. Signed-off-by: Paul Szczepanek Reviewed-by: Honnappa Nagarahalli Acked-by: Bruce Richardson --- lib/meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.25.1 diff --git a/lib/meson.build b/lib/meson.build index 179a272932..7c90602bf5 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -222,6 +222,22 @@ foreach l:libraries includes += include_directories(l) dpdk_includes += include_directories(l) + # special case for header only libraries + if sources.length() == 0 + shared_dep = declare_dependency(include_directories: includes, + dependencies: shared_deps) + static_dep = declare_dependency(include_directories: includes, + dependencies: static_deps) + set_variable('shared_rte_' + name, shared_dep) + set_variable('static_rte_' + name, static_dep) + dpdk_shared_lib_deps += shared_dep + dpdk_static_lib_deps += static_dep + if developer_mode + message('lib/@0@: Defining dependency "@1@"'.format(l, name)) + endif + continue + endif + if developer_mode and is_windows and use_function_versioning message('@0@: Function versioning is not supported by Windows.'.format(name)) endif