From: Bruce Richardson Subject: [RFCv2 02/40] build: create pkg-config file for DPDK Date: Mon, 14 Aug 2017 10:51:30 +0100 Message-ID: <20170814095208.166496-3-bruce.richardson@intel.com> References: <20170814095208.166496-1-bruce.richardson@intel.com> Cc: thomas@monjalon.net, Bruce Richardson To: dev@dpdk.org Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 779909147 for ; Mon, 14 Aug 2017 12:03:19 +0200 (CEST) In-Reply-To: <20170814095208.166496-1-bruce.richardson@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Bruce Richardson --- meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 8383d23b5..d7acf174d 100644 --- a/meson.build +++ b/meson.build @@ -36,9 +36,10 @@ project('DPDK', 'C', meson_version: '>= 0.40.1' ) -# set up some global vars for compiler, platform and configuration +# set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') dpdk_conf = configuration_data() +dpdk_libraries = [] # for static libs, treat the drivers as regular libraries, otherwise # for shared libs, put them in a driver folder @@ -58,3 +59,17 @@ build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, configuration: dpdk_conf, install_dir: get_option('includedir')) + +# the DPDK libs needs to be passed to the link command in reverse order +dpdk_link_libs = [] +foreach lib: dpdk_libraries + dpdk_link_libs = [lib] + dpdk_link_libs +endforeach + +pkg = import('pkgconfig') +pkg.generate(name: meson.project_name(), + version: meson.project_version(), + libraries: dpdk_link_libs, + description: 'The Data Plane Development Kit (DPDK)', + extra_cflags: '-include "rte_config.h"' +) -- 2.13.4