--- /dev/null
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2022 Intel Corporation
+
+message('DPDK subproject linking: ' + get_option('default_library'))
+if get_option('default_library') == 'static'
+ dpdk_dep = declare_dependency(
+ version: meson.project_version(),
+ dependencies: dpdk_static_lib_deps,
+ # static library deps in DPDK build don't include "link_with" parameters,
+ # so explicitly link-in both libs and drivers
+ link_with: dpdk_static_libraries,
+ link_whole: dpdk_drivers,
+ link_args: dpdk_extra_ldflags)
+else
+ dpdk_dep = declare_dependency(
+ version: meson.project_version(),
+ # shared library deps include all necessary linking parameters
+ dependencies: dpdk_shared_lib_deps)
+endif
+
+libdpdk_dep = dpdk_dep
set_variable('shared_@0@'.format(lib_name), shared_dep)
set_variable('static_@0@'.format(lib_name), static_dep)
+ # for drivers, we only need to add dependency objects for static libs,
+ # shared lib drivers are not linked in
+ dpdk_static_lib_deps += static_dep
+
dependency_name = ''.join(lib_name.split('rte_'))
if testpmd_sources.length() != 0
testpmd_drivers_sources += testpmd_sources
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
dpdk_conf = configuration_data()
dpdk_libraries = []
dpdk_static_libraries = []
+dpdk_shared_lib_deps = []
+dpdk_static_lib_deps = []
dpdk_chkinc_headers = []
dpdk_driver_classes = []
dpdk_drivers = []
# build pkg-config files for dpdk
subdir('buildtools/pkg-config')
+if meson.is_subproject()
+ subdir('buildtools/subproject')
+endif
+
# final output, list all the libs and drivers to be built
# this does not affect any part of the build, for information only.
output_message = '\n=================\nLibraries Enabled\n=================\n'