set(dpdk_LIBRARIES) does not reset this variable, it leaves it
unchanged.
if pkg-config manages to find DPDK libraries, dpdk_LIBRARIES would be
set with a string like "rte_node;rte_graph;..." by
pkg_check_modules(dpdk QUIET libdpdk).
but we would want to set this variable to the import paths of the
required libraries. so reset it before appending them to this variable.
this change helps to address the build failure when building Ceph with
DPDK installed into system along with its .pc file.
Signed-off-by: Kefu Chai <kchai@redhat.com>
# for collecting dpdk library targets, it will be used when defining dpdk::dpdk
set(_dpdk_libs)
# for list of dpdk library archive paths
-set(dpdk_LIBRARIES)
-
+set(dpdk_LIBRARIES "")
foreach(c ${components})
set(dpdk_lib dpdk::${c})
if(TARGET ${dpdk_lib})