]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: initialize dpdk_LIBRARIES with empty list
authorKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 07:49:20 +0000 (15:49 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 07:53:03 +0000 (15:53 +0800)
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>
cmake/modules/Finddpdk.cmake

index f7b7a2d4b2fe772fa256be8410810694fbceb086..2cf2e6343b0eeaa5182bf7723b40223d074a73f3 100644 (file)
@@ -72,8 +72,7 @@ set(components
 # 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})